diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc38e4b25..abf1aa01f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Changelog for NeoFS Node - `neofs-cli container delete` command pre-checks container ownership (#2106) - Policer cache size is now 1024 (#2158) - Tree service now synchronizes with container nodes in a random order (#2127) +- Pilorama no longer tries to apply already applied operations (#2161) ### Fixed - Open FSTree in sync mode by default (#1992) diff --git a/pkg/local_object_storage/pilorama/boltdb.go b/pkg/local_object_storage/pilorama/boltdb.go index 35cd23e8fc..d6a7d67680 100644 --- a/pkg/local_object_storage/pilorama/boltdb.go +++ b/pkg/local_object_storage/pilorama/boltdb.go @@ -299,6 +299,12 @@ func (t *boltForest) applyOperation(logBucket, treeBucket *bbolt.Bucket, lm *Log var tmp LogMove var cKey [17]byte + var logKey [8]byte + binary.BigEndian.PutUint64(logKey[:], lm.Time) + if logBucket.Get(logKey[:]) != nil { + return nil + } + c := logBucket.Cursor() key, value := c.Last()