Skip to content

Commit

Permalink
fix: overwrite existing stampindex if they have the same timestamp (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill authored Nov 22, 2023
1 parent 3a5e25e commit aa2746c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storer/internal/upload/uploadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ func (u *uploadPutter) Put(ctx context.Context, s internal.Storage, writer stora
case loaded && !item.ChunkIsImmutable:
prev := binary.BigEndian.Uint64(item.StampTimestamp)
curr := binary.BigEndian.Uint64(chunk.Stamp().Timestamp())
if prev >= curr {
if prev > curr {
return errOverwriteOfNewerBatch
}
err = stampindex.Store(writer, stampIndexUploadNamespace, chunk)
Expand Down

0 comments on commit aa2746c

Please sign in to comment.