-
Notifications
You must be signed in to change notification settings - Fork 0
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
Parallelize Legacy Indexing Service Lookup #122
Comments
Hey @hannahhoward ! |
hi @Khwahish29 this ticket is very time dependent so I've already assigned it to @frrist let me take a look at what else might be available -- are you a go developer primarily? |
@Khwahish29 a good issue to pickup storacha/go-w3up#8 |
frrist
pushed a commit
that referenced
this issue
Feb 12, 2025
…kups Previously, the Query method in IndexingService executed lookups sequentially: 1. Query the normal indexing service. 2. If no results were found, query the block index store. This forced an unnecessary delay when results were only available in the block index store. Changes: - Run the primary (indexing service) and legacy (block index store) queries in parallel. - If the primary query returns results, the legacy query is immediately canceled. - Maintain the original behavior: prioritize primary results and only fall back to legacy if needed. - closes #122
Sure thing @hannahhoward ! I can work on storacha/go-w3up#8. Thanks! |
volmedo
added a commit
that referenced
this issue
Feb 13, 2025
Thinking specifically of enabling cancellation of the request by cancelling the provided context. `BucketFallbackMapper` is used by the legacy claims logic, and now that #122 will make that run in parallel with the query to IPNI and can potentially be cancelled, I took a look at the context propagation chain and noticed we were not using it in these calls.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
At present, the legacy "IndexingService" wrapper (https://github.com/storacha/indexing-service/blob/main/pkg/service/legacy/service.go#L49-L117) executes queries sequentially:
The problem? Step 1 has to finish before Step 2 starts. If we don't have results through the normal flow, but do have them in the block index store, we waste time waiting on the normal flow.
Proposal
Run the standard indexer service query and block index store query in parallel to speed things up. The key rule:
This keeps the normal service as the primary source but avoids unnecessary delays when it can't find anything.
Why?
Right now, Query forces a strict step-by-step lookup, which slows things down. Running both queries in parallel cuts down on wait time while keeping the existing behavior intact.
This change makes lookups faster, and doesn’t mess with the logic—just makes it more efficient
The text was updated successfully, but these errors were encountered: