Query: support cursor-based prefix iteration (key_prefix_from)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by locating Query and QueryBuilder, then trace get_many, key_prefix, offset, and SortBy::KeyAuthor to understand the current prefix scan. Implement the cursor-based lower-bound behavior described in the issue and verify that key_prefix_from seeks from the cursor instead of client-side skipping.
Written by the indexing model from the issue text.
Description
Problem
get_many with key_prefix always starts scanning from the beginning of the prefix. For applications that maintain a cursor (e.g., iterating over an event log from the last processed position), this forces O(n) client-side skipping via offset.
Proposed solution
Add a from: Option<Bytes> field to Query and a key_prefix_from(prefix, cursor) method on QueryBuilder. When using SortBy::KeyAuthor, the B-tree lower bound is set to the cursor position instead of the prefix start — O(log n) seek.
PR
- Dominant language
- Rust
- Stars
- 81
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from n0-computer/iroh-docs
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
n0-computer/iroh-docs#124 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
n0-computer/iroh-docs#122 ·
-
Sync with a peer stays wedged after one AlreadySyncing refusal (local state never leaves Running)Open
Difficulty 3/5 Half a day Newbie friendliness 62/100
n0-computer/iroh-docs#121 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
n0-computer/iroh-docs#120 ·
-
Sync with other peers never re-downloads blobsPossibly taken @cbenhagen claimed this 235 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 38/100
n0-computer/iroh-docs#82 · 2 comments · 3 reactions ·
All issues in n0-computer/iroh-docs
Similar issues
-
area:web kind:bug priority:p2 ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
sims1253/r-typeshed#140 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/craft-libs#2867 ·
Maintainers usually reply within 1 day
-
help wanted needs investigation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100