Skip to content

Commit 85eaa3f

Browse files
authored
fix: continue pushing chunks if tag deleted (#5018)
1 parent ac831c1 commit 85eaa3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/storer/internal/upload/uploadstore.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ func (u *uploadPutter) Close(s storage.IndexStore, addr swarm.Address) error {
456456
ti := &TagItem{TagID: u.tagID}
457457
err := s.Get(ti)
458458
if err != nil {
459+
// If the tag is not found, it might have been removed or never existed.
460+
// In this case, there’s no need to update or delete it—so simply return.
461+
if errors.Is(err, storage.ErrNotFound) {
462+
return nil
463+
}
459464
return fmt.Errorf("failed reading tag while closing: %w", err)
460465
}
461466

0 commit comments

Comments
 (0)