metabase: put batch during resync metabase#3804
Merged
roman-khimov merged 1 commit intomasterfrom Feb 11, 2026
Merged
Conversation
c0ea8c6 to
d5c1991
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3804 +/- ##
==========================================
+ Coverage 25.51% 25.55% +0.04%
==========================================
Files 664 668 +4
Lines 42689 42889 +200
==========================================
+ Hits 10892 10961 +69
- Misses 30794 30924 +130
- Partials 1003 1004 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d5c1991 to
9c8a179
Compare
cthulhu-rider
approved these changes
Feb 10, 2026
9c8a179 to
31aa82f
Compare
31aa82f to
39c9f7f
Compare
Doing `Put()` for every object is problematic on its own because it's a BoltDB `Batch()` for every object and in absence of concurrent modifications this means `max_batch_delay` for every object. So rework transaction handling for the resync case, open a transaction, process 1K objects, flush the transaction, rinse, repeat. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics BenchmarkPutBatch BenchmarkPutBatch/batch_size_1 BenchmarkPutBatch/batch_size_1-16 589 2287473 ns/op 437.2 objects/sec 276274 B/op 756 allocs/op BenchmarkPutBatch/batch_size_10 BenchmarkPutBatch/batch_size_10-16 2960 838220 ns/op 1193 objects/sec 221012 B/op 702 allocs/op BenchmarkPutBatch/batch_size_100 BenchmarkPutBatch/batch_size_100-16 5220 405635 ns/op 2465 objects/sec 132055 B/op 564 allocs/op BenchmarkPutBatch/batch_size_1000 BenchmarkPutBatch/batch_size_1000-16 5659 631707 ns/op 1583 objects/sec 60497 B/op 559 allocs/op BenchmarkPutBatch/individual_puts BenchmarkPutBatch/individual_puts-16 96 12830332 ns/op 77.94 objects/sec 200998 B/op 538 allocs/op PASS ``` Closes #3453. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
roman-khimov
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3453.