Improved metabase interfaces for group-addressed operations#3933
Open
roman-khimov wants to merge 3 commits intomasterfrom
Open
Improved metabase interfaces for group-addressed operations#3933roman-khimov wants to merge 3 commits intomasterfrom
roman-khimov wants to merge 3 commits intomasterfrom
Conversation
1a82efb to
57c39a3
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3933 +/- ##
==========================================
- Coverage 26.83% 26.78% -0.05%
==========================================
Files 670 670
Lines 44372 44360 -12
==========================================
- Hits 11906 11884 -22
- Misses 31355 31365 +10
Partials 1111 1111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
carpawell
approved these changes
Apr 14, 2026
| return fmt.Errorf("can't remove objects: %w", err) | ||
| } | ||
| for _, r := range res.RemovedObjects { | ||
| cmd.Println("Removed:", r.ID.String()) |
Member
There was a problem hiding this comment.
Suggested change
| cmd.Println("Removed:", r.ID.String()) | |
| cmd.Println("Removed: ", r.ID.String()) |
Member
Author
There was a problem hiding this comment.
Println adds a separator by itself.
| addr.SetContainer(cID) | ||
|
|
||
| res := make([]oid.Address, 0, len(mm)) | ||
| func measuredObjsToAddresses(cID cid.ID, mm []object.MeasuredObject) []oid.ID { |
Member
There was a problem hiding this comment.
it does not return addresses now
| } | ||
|
|
||
| // mergeOIDs merges given set of lists of object IDs into a single flat | ||
| // list of addresses in the same given container. ids are expected to be |
| cnrMetaBktKey[0] = metadataPrefix | ||
|
|
||
| res := make([]RemovedObject, len(addrs)) | ||
| func supplementRemovedObjects(cur *bbolt.Cursor, addrs []oid.ID) ([]RemovedObject, error) { |
Member
Author
There was a problem hiding this comment.
Some addrs are variable names.
| @@ -66,23 +73,22 @@ func (db *DB) iterateIDs(c *bbolt.Cursor, h func(oid.ID) error, offset oid.ID) e | |||
Member
Author
There was a problem hiding this comment.
Fixed all of the outdated comments.
The only real user of random address lists is lancet, it can cope with that. GC is semi-dependent on this, but that's an area for improvement. Otherwise this change allows to seriously simplify some metabase logic. Fixes #3900. Signed-off-by: Roman Khimov <roman@nspcc.ru>
We even have a test for it. Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Roman Khimov <roman@nspcc.ru>
57c39a3 to
9bbbf09
Compare
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.
Simplify metabase internals, fix some existing and potential bugs.