mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Send kafka notification messages in batches when queue_dir is enabled (#18164)
Fixes #18124
This commit is contained in:
@@ -254,7 +254,7 @@ func (target *MySQLTarget) send(eventData event.Event) error {
|
||||
}
|
||||
|
||||
// SendFromStore - reads an event from store and sends it to MySQL.
|
||||
func (target *MySQLTarget) SendFromStore(eventKey string) error {
|
||||
func (target *MySQLTarget) SendFromStore(key store.Key) error {
|
||||
if err := target.init(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -273,7 +273,7 @@ func (target *MySQLTarget) SendFromStore(eventKey string) error {
|
||||
}
|
||||
}
|
||||
|
||||
eventData, eErr := target.store.Get(eventKey)
|
||||
eventData, eErr := target.store.Get(key.Name)
|
||||
if eErr != nil {
|
||||
// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
|
||||
// Such events will not exist and wouldve been already been sent successfully.
|
||||
@@ -291,7 +291,7 @@ func (target *MySQLTarget) SendFromStore(eventKey string) error {
|
||||
}
|
||||
|
||||
// Delete the event from store.
|
||||
return target.store.Del(eventKey)
|
||||
return target.store.Del(key.Name)
|
||||
}
|
||||
|
||||
// Close - closes underneath connections to MySQL database.
|
||||
|
||||
Reference in New Issue
Block a user