fix: store notification events immediately for persistent queues (#17112)

This commit is contained in:
Praveen raj Mani
2023-05-02 20:23:13 +05:30
committed by GitHub
parent ab34f0065c
commit 1704abaf6b
18 changed files with 49 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2015-2021 MinIO, Inc.
// Copyright (c) 2015-2023 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
@@ -196,13 +196,13 @@ func (target *MySQLTarget) isActive() (bool, error) {
// Save - saves the events to the store which will be replayed when the SQL connection is active.
func (target *MySQLTarget) Save(eventData event.Event) error {
if target.store != nil {
return target.store.Put(eventData)
}
if err := target.init(); err != nil {
return err
}
if target.store != nil {
return target.store.Put(eventData)
}
_, err := target.isActive()
if err != nil {
return err