mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Speed up metabase resync process #1454
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#1454
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @roman-khimov on GitHub (Jul 7, 2025).
Is your feature request related to a problem? Please describe.
I'm always frustrated when metabase resync takes too much time. Currently it iterates over all objects and does
metabase.Put()for all objects as well as has some special handling for locks and tombstones. Lock and TS handling will be simplified with https://github.com/nspcc-dev/neofs-api/issues/312 and https://github.com/nspcc-dev/neofs-api/issues/311, but doingPut()for every object is problematic on its own because it's a BoltDBBatch()for every object and in absence of concurrent modifications this meansmax_batch_delayfor every object. If it's 10ms per object this means ~3h for 1M objects not even counting reads and real writing time.Describe the solution you'd like
Rework transaction handling for the resync case, open a transaction, process something like 1K objects, flush the transaction, rinse, repeat.
Describe alternatives you've considered
Keep wasting time for nothing.