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

Replace ds.Query interface with lower-level Iterator interface #1813

Open
Tracked by #1812
jsimnz opened this issue Aug 24, 2023 · 2 comments
Open
Tracked by #1812

Replace ds.Query interface with lower-level Iterator interface #1813

jsimnz opened this issue Aug 24, 2023 · 2 comments
Assignees
Labels
area/db-system Related to the core system related components of the DB perf Performance issue or suggestion refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Milestone

Comments

@jsimnz
Copy link
Member

jsimnz commented Aug 24, 2023

Currently we use the ds.Query interface in several places, when really, we only need the general Iterator interfaces provided by most KV stores.

This will likely require a much more foundational refactor to Defra to replace the general ds.Datastore interfaces, with native abstractions that are designed to expose Iterators instead of Queries.

The reason we need to replace the ds.Query system, is that its basically just a very bad implementation of our query planner engine, as it supports complex ordering, filtering, and more. But, if we look at the call sites of where we use the Query system, all we need is an iterator. Whats worse, is that those call sites, like in the fetcher, need to access common Iterator methods, like Seek which Query doesn't provide.

Update 2024-12-16

A new repo CoreKV has been created by John, this contains a new stuff to replace most of the Defra datastore package, it exposes Seek functionality.

This ticket will now integrate that library into Defra.

@jsimnz jsimnz added perf Performance issue or suggestion area/db-system Related to the core system related components of the DB refactor This issue specific to or requires *notable* refactoring of existing codebases and components labels Aug 24, 2023
@jsimnz jsimnz added this to the DefraDB v0.6 milestone Aug 24, 2023
@jsimnz jsimnz self-assigned this Sep 18, 2023
@jsimnz jsimnz modified the milestones: DefraDB v0.6, DefraDB v0.8 Sep 18, 2023
@fredcarle fredcarle modified the milestones: DefraDB v0.8, DefraDB v0.9 Jan 4, 2024
@fredcarle fredcarle modified the milestones: DefraDB v0.9, DefraDB v0.10 Jan 19, 2024
@jsimnz
Copy link
Member Author

jsimnz commented Dec 8, 2024

Closed #1600 due to it being a duplicate. Context from that thread:

Follow up refactor for #490 and #1500.

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Jan 2, 2025

Blocked by sourcenetwork/corekv#14

WIP branch name 1813-integrate-ckv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-system Related to the core system related components of the DB perf Performance issue or suggestion refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

No branches or pull requests

3 participants