Skip to content

Commit

Permalink
Add a defensive check on blob status (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix authored Feb 21, 2024
1 parent a46bd99 commit 402eafb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions disperser/batcher/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ func (f *finalizer) updateBlobs(ctx context.Context, metadatas []*disperser.Blob
for _, m := range metadatas {
stageTimer := time.Now()
blobKey := m.GetBlobKey()
if m.BlobStatus != disperser.Confirmed {
f.logger.Error("FinalizeBlobs: the blob retrieved by status Confirmed is actually", m.BlobStatus.String(), "blobKey", blobKey.String())
continue
}
confirmationMetadata, err := f.blobStore.GetBlobMetadata(ctx, blobKey)
if err != nil {
f.logger.Error("FinalizeBlobs: error getting confirmed metadata", "blobKey", blobKey.String(), "err", err)
Expand Down

0 comments on commit 402eafb

Please sign in to comment.