Skip to content

Commit e1006c0

Browse files
authored
Merge pull request containerd#10723 from saketjajoo/3787-race-condition-fix
Fix the race condition during GC of snapshots when client retries
2 parents 9c23fd7 + d7f8303 commit e1006c0

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

core/unpack/unpacker.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,6 @@ func (u *Unpacker) unpack(
296296
}
297297
defer unlock()
298298

299-
if _, err := sn.Stat(ctx, chainID); err == nil {
300-
// no need to handle
301-
return nil
302-
} else if !errdefs.IsNotFound(err) {
303-
return fmt.Errorf("failed to stat snapshot %s: %w", chainID, err)
304-
}
305-
306299
// inherits annotations which are provided as snapshot labels.
307300
snapshotLabels := snapshots.FilterInheritedLabels(desc.Annotations)
308301
if snapshotLabels == nil {

0 commit comments

Comments
 (0)