Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 153f5fb

Browse files
author
Krish Chowdhary
committed
remove opMap delete on successful processing
1 parent ff20393 commit 153f5fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: controller/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ func (c *ObjectStorageController) processNextItem(ctx context.Context) bool {
284284
err = delete(ctx, o.Object)
285285
if err == nil {
286286
o.Indexer.Delete(o.Object)
287+
c.opMap.Delete(uuid)
287288
}
288289
default:
289290
panic("unknown item in queue")
@@ -320,7 +321,6 @@ func (c *ObjectStorageController) GetOpLock(op types.UID) *sync.Mutex {
320321
// handleErr checks if an error happened and makes sure we will retry later.
321322
func (c *ObjectStorageController) handleErr(err error, uuid types.UID) {
322323
if err == nil {
323-
c.opMap.Delete(uuid)
324324
return
325325
}
326326
c.queue.AddRateLimited(uuid)

0 commit comments

Comments
 (0)