No way to query past Query.Prefix?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the Query API and the iterator path illustrated in go-ds-badger around line 270, then compare the datastore implementations that must honor Prefix. Review the existing comment history before deciding on the API behavior. Done means the seek and scanning semantics are agreed, implementations are updated consistently, and both bounded and unbounded iteration are covered.
Written by the indexing model from the issue text.
Description
Hi gents!
Currently, Query.Prefix is used to do the initial seek when a Query begins, and iteration only continues while that prefix holds. There needs to be a flag that basically says, hey, don't use Prefix once iteration has begun. Otherwise, there's no way to effectively do a seek and do an arbitrary amount of scanning. This seems like a critical feature to leave behind, yikes.
Hopefully, I'm missing something!?
For example, in go-ds-badger: (line 270+)
it := txn.NewIterator(opt)
it.Seek(prefix)
...
qrb.Process.Go(func(worker goprocess.Process) {
...
for sent := 0; it.ValidForPrefix(prefix); sent++ {
...
}
}
...
could be enhanced to:
it := txn.NewIterator(opt)
it.Seek(prefix)
if q.PrefixOnlySeeks {
prefix = nil
}
...
Adding this would be easy, but all the impls would need to be updated of course. So maybe it's done as a selectively available feature?
This is a dealbreaker for us, but we love Datastore and want to use and support it! If some at PL agrees to accept our pull requests in a timely fashion, we'll help do the work. I'm sad we're now in this position, and would take less than a few mins for dbs like leveldb, badger, and bolt. What do y'all think?
We kindly need resolution on this relatively soon one way or the other so that we know we need to pass on Datastore.
Thanks,
Drew
- Dominant language
- Go
- Stars
- 248
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 ipfs/go-datastore
-
exp/novice help wanted kind/enhancement status/ready
Difficulty 5/5 Over a week Newbie friendliness 25/100
ipfs/go-datastore#160 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ipfs/go-datastore#139 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
ipfs/go-datastore#102 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ipfs/go-datastore#101 · 4 comments · 1 reaction ·
-
Add a Rename method?May be free again @schomatis claimed this 2964 days ago, and no pull request is open. Open
ipfs/go-datastore#100 · 3 comments · 2 assignees ·
All issues in ipfs/go-datastore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
blinklabs-io/gouroboros#3026 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AvengeMedia/DankMaterialShell#4291 ·
-
[Bug]: autoexport rejects OTEL_*_EXPORTER values that differ only in casePossibly taken @yuminn-k claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
open-telemetry/opentelemetry-go-contrib#10291 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
podman-container-tools/skopeo#3041 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day