forked from TrueCloudLab/frostfs-node
[#2161] pilorama: Do not apply already existing operations
Speeds up synchronization a bit. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>carpawell/fix/multiple-cache-update-requests-FROST
parent
3bb5a320d7
commit
e5c304536b
|
@ -23,6 +23,7 @@ Changelog for NeoFS Node
|
||||||
- `neofs-cli container delete` command pre-checks container ownership (#2106)
|
- `neofs-cli container delete` command pre-checks container ownership (#2106)
|
||||||
- Policer cache size is now 1024 (#2158)
|
- Policer cache size is now 1024 (#2158)
|
||||||
- Tree service now synchronizes with container nodes in a random order (#2127)
|
- Tree service now synchronizes with container nodes in a random order (#2127)
|
||||||
|
- Pilorama no longer tries to apply already applied operations (#2161)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Open FSTree in sync mode by default (#1992)
|
- Open FSTree in sync mode by default (#1992)
|
||||||
|
|
|
@ -299,6 +299,12 @@ func (t *boltForest) applyOperation(logBucket, treeBucket *bbolt.Bucket, lm *Log
|
||||||
var tmp LogMove
|
var tmp LogMove
|
||||||
var cKey [17]byte
|
var cKey [17]byte
|
||||||
|
|
||||||
|
var logKey [8]byte
|
||||||
|
binary.BigEndian.PutUint64(logKey[:], lm.Time)
|
||||||
|
if logBucket.Get(logKey[:]) != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
c := logBucket.Cursor()
|
c := logBucket.Cursor()
|
||||||
|
|
||||||
key, value := c.Last()
|
key, value := c.Last()
|
||||||
|
|
Loading…
Reference in New Issue