Skip to content

Commit

Permalink
Move unlock call to a background context in GC
Browse files Browse the repository at this point in the history
This ensures that if the GC operation times out, the unlock still can run
  • Loading branch information
josephschorr committed Jan 9, 2025
1 parent 31b08ba commit 8b33ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/datastore/common/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func RunGarbageCollection(gc GarbageCollector, window, timeout time.Duration) er
}

defer func() {
err := gc.UnlockAfterGCRun(ctx)
err := gc.UnlockAfterGCRun(context.Background())
if err != nil {
log.Error().
Err(err).
Expand Down

0 comments on commit 8b33ada

Please sign in to comment.