From aa2746cb610fe2f415b30ce28069c7c17c73a1b1 Mon Sep 17 00:00:00 2001 From: Acha Bill <57879913+acha-bill@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:20:12 +0100 Subject: [PATCH] fix: overwrite existing stampindex if they have the same timestamp (#4468) --- 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)