From 3c588fc41eb708366500cf907f968e80ca62a4ee Mon Sep 17 00:00:00 2001 From: Acha Bill Date: Tue, 21 Nov 2023 13:49:49 +0100 Subject: [PATCH] fix: check if prev stamp timestamp is strictly greater than the current one --- pkg/storer/internal/upload/uploadstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storer/internal/upload/uploadstore.go b/pkg/storer/internal/upload/uploadstore.go index b3faa96fccf..1126770176a 100644 --- a/pkg/storer/internal/upload/uploadstore.go +++ b/pkg/storer/internal/upload/uploadstore.go @@ -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)