Skip to content

Commit

Permalink
fix(CSI-224): purgeVolume() not scheduled if gc.isRunning()
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyberezansky committed Jul 28, 2024
1 parent cf1f6f6 commit 8baaabf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/wekafs/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ func (gc *innerPathVolGc) triggerGcVolume(ctx context.Context, volume *Volume) {
fsName := volume.FilesystemName
gc.Lock()
defer gc.Unlock()
go gc.purgeVolume(ctx, volume)
if gc.isRunning[fsName] {
gc.isDeferred[fsName] = true
return
}
gc.isRunning[fsName] = true
gc.isDeferred[fsName] = true
go gc.purgeVolume(ctx, volume)
}

func (gc *innerPathVolGc) purgeVolume(ctx context.Context, volume *Volume) {
Expand Down

0 comments on commit 8baaabf

Please sign in to comment.