-
Notifications
You must be signed in to change notification settings - Fork 40
services/object: use SearchV2 for search objects #3312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still does too much to me. This affects Search RPC operation, while the intention was to convert internal SN users to proper SearchV2. We'll need to do this anyway once we're to drop the old Search, so better isolate SN calls (not related to Search processing) and deal only with them.
Closes #3143. Signed-off-by: Andrey Butusov <[email protected]>
6f5d97c
to
79eb637
Compare
@roman-khimov Is that what you need? Am I in the right direction? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3312 +/- ##
=======================================
Coverage 21.67% 21.68%
=======================================
Files 721 721
Lines 53948 53931 -17
=======================================
+ Hits 11694 11695 +1
+ Misses 41398 41381 -17
+ Partials 856 855 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
var mu sync.Mutex | ||
|
||
result := make([]oid.ID, 0) | ||
err := o.containers.ForEachRemoteContainerNode(cnr, func(node netmapsdk.NodeInfo) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you have to do it this way, it should be a regular SearchV2 call just like it was with the old Search call.
@@ -665,19 +681,73 @@ func (o objectSource) Head(ctx context.Context, addr oid.Address) (*objectSDK.Ob | |||
} | |||
|
|||
func (o objectSource) Search(ctx context.Context, cnr cid.ID, filters objectSDK.SearchFilters) ([]oid.ID, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API can be reworked to be sv2-compatible as well. It is important to have it being used properly. For example, tombstone verifier for v2 doesn't need all oids, it can set lower limit. For v1 it can avoid subsequent link object HEAD by requesting payload size (see #3324, it's not as reliable as children check, but it's good enough for old v1 objects).
Closes #3143.
I hope I understood correctly what exactly needs to be changed.