Merge pull request #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
This commit is contained in:
Maksym Pavlenko
2024-10-04 10:46:57 -07:00
committed by GitHub

View File

@@ -298,13 +298,6 @@ func (u *Unpacker) unpack(
}
defer unlock()
if _, err := sn.Stat(ctx, chainID); err == nil {
// no need to handle
return nil
} else if !errdefs.IsNotFound(err) {
return fmt.Errorf("failed to stat snapshot %s: %w", chainID, err)
}
// inherits annotations which are provided as snapshot labels.
snapshotLabels := snapshots.FilterInheritedLabels(desc.Annotations)
if snapshotLabels == nil {