Skip to content

Commit b36fa65

Browse files
authored
Merge pull request containerd#10763 from k8s-infra-cherrypick-robot/cherry-pick-10723-to-release/1.7
[release/1.7] Fix the race condition during GC of snapshots when client retries
2 parents 45967a7 + cb5e6a0 commit b36fa65

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pkg/unpack/unpacker.go

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

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

0 commit comments

Comments
 (0)