Skip to content
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

Support multi spans and on Document Fetcher. #60

Closed
jsimnz opened this issue Nov 25, 2021 · 3 comments · Fixed by #85
Closed

Support multi spans and on Document Fetcher. #60

jsimnz opened this issue Nov 25, 2021 · 3 comments · Fixed by #85
Assignees
Labels
area/datastore Related to the datastore / storage engine system discussion Discussion, Request for Comments (RFC) feature New feature or request
Milestone

Comments

@jsimnz
Copy link
Member

jsimnz commented Nov 25, 2021

Currently, we only support single spans on our document fetcher, moreover, it only supports prefix scans and ignores the "end" range stop point.

To make the fetcher more efficient we need to support mutlispans and proper range scans.

The blocking issue is go-datastore#116. Needs proper architecture/implementation on the interface package, and a series of datastore implementations. That issue will give context.

@jsimnz jsimnz added feature New feature or request area/datastore Related to the datastore / storage engine system discussion Discussion, Request for Comments (RFC) labels Nov 25, 2021
@jsimnz jsimnz added this to the DefraDB v0.3 milestone Nov 25, 2021
@AndrewSisley AndrewSisley self-assigned this Nov 25, 2021
@jsimnz
Copy link
Member Author

jsimnz commented Nov 27, 2021

hey @AndrewSisley peeked at some of the commits youre working on for this issue in the sisley/perf/I60-badger-multi-scan branch, and I had some thoughts before you got too far into things.

As far as I can tell, you are re-binding the dependancy the internals of the DB has on badger itself. Much of the goal of relying on the ds.Datastore and the core/DSReaderWriter interfaces is to avoid such a tight coupling.

Specifically, updating the core/client interfaces

badgerds.IterableTxn

I think the multispan stuff should be applied to either

  1. A more foundational level of the ds.Datastore interface workflow, and bubble up in the specific datastore implementations
    or
  2. A short term approach utilizing the existing prefix query structures of the datastore query package and re-initializing those structures.

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Nov 27, 2021

Ah don't worry about that - that is an interface I defined in the v3 package, that is not specific to badger db - it just lives there in the extreme-short-term because thats where I happened to write it down first :) none of the defra stuff in that branch should currently be (directly) dependent on any badger stuff.

If I'm understanding what you mean correctly at least :) Will have a re-read once I'm properly working again (just saw this in my inbox)

@AndrewSisley
Copy link
Contributor

Marking as blocked until the benchmarks are ready - code is not properly cleaned up yet (re readability/location/etc), but the main happy path should be fairly static now computationally and we should find out whether it is worth it performance wise before continuing

@jsimnz jsimnz changed the title Support multi-spans on Document Fetcher. Support multi range spans and on Document Fetcher. Nov 29, 2021
@AndrewSisley AndrewSisley removed their assignment Nov 29, 2021
@jsimnz jsimnz changed the title Support multi range spans and on Document Fetcher. Support multi spans and on Document Fetcher. Nov 30, 2021
@AndrewSisley AndrewSisley linked a pull request Dec 9, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datastore Related to the datastore / storage engine system discussion Discussion, Request for Comments (RFC) feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants