Skip to content

Commit e96d35e

Browse files
committed
Don't re-enqueue deletion if context is cancelled
Signed-off-by: Brad Davidson <[email protected]>
1 parent 0dc5b17 commit e96d35e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/logstructured/logstructured.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func (l *LogStructured) handleTTLEvents(ctx context.Context, rwMutex *sync.RWMut
339339
}
340340

341341
logrus.Tracef("TTL delete key=%v, modRev=%v", eventKV.key, eventKV.modRevision)
342-
if _, _, _, err := l.Delete(ctx, eventKV.key, eventKV.modRevision); err != nil {
342+
if _, _, _, err := l.Delete(ctx, eventKV.key, eventKV.modRevision); err != nil && !errors.Is(err, context.Canceled) {
343343
logrus.Errorf("TTL delete trigger failed for key=%v: %v, requeuing", eventKV.key, err)
344344
queue.AddAfter(eventKV.key, retryInterval)
345345
return true

0 commit comments

Comments
 (0)