Skip to content

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

End-rey
Copy link
Contributor

@End-rey End-rey commented Apr 18, 2025

Closes #3143.

I hope I understood correctly what exactly needs to be changed.

Copy link
Member

@roman-khimov roman-khimov left a 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.

@End-rey End-rey force-pushed the 3143-use-searchv2-for-internal-sn-needs branch from 6f5d97c to 79eb637 Compare April 25, 2025 12:13
@End-rey End-rey marked this pull request as draft April 25, 2025 12:14
@End-rey
Copy link
Contributor Author

End-rey commented Apr 25, 2025

@roman-khimov Is that what you need? Am I in the right direction?

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 64 lines in your changes missing coverage. Please review.

Project coverage is 21.68%. Comparing base (04e8031) to head (79eb637).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
cmd/neofs-node/object.go 0.00% 64 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

var mu sync.Mutex

result := make([]oid.ID, 0)
err := o.containers.ForEachRemoteContainerNode(cnr, func(node netmapsdk.NodeInfo) {
Copy link
Member

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) {
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use SearchV2 for internal SN needs
2 participants