-
Notifications
You must be signed in to change notification settings - Fork 177
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
Match datastore semantics more closely: btree_scan
=> index_scan_range
#2203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the ABI actually is about is fast range queries.
The new direct index can also support that,
Will there be logic for choosing which index to use within the current syscall?
The existing syscall |
I would dispute this point, the ABI is actually about using an index to perform a range query. The host must validate that the particular type of index specified by I think this is an important point. Not all indexes will be able to support all index operations. Also NIT, let's not call them queries, they're datastore operations.
I don't think you can because if we add a hash index we need to validate that that you did not pass in the |
TBH I'm wavering about this renaming scheme since those points were muddled in the short period between our conversation and merging this PR. I don't think we should revert it necessarily, but I think it is very very important that we're clear that these are physical datastore operations, and the query engine should always be able to choose the specific physical operation it wants to do. |
This was my main concern, and I approved based on the confirmation from @Centril that these are indeed remaining purely physical operations. |
I'm not sure what the distinction is; I think we're saying the same thing, that this ABI affords range scans via an index, specifically for those indices where we think it is reasonable to expose range scan functionality. For example, you can do a range scan via a hash index, but it's a bad idea to expose such a facility, so we won't.
We're aligned. :) A
What I meant was that we're avoiding a check until such time as we add a hash index, which might not be necessary, based on the the surprising perf outcomes.
Agreed. The query engine will retain full control over what index/operation it wants to use with this PR merged. |
Two cents here: the host function is going to have to dispatch on the index type no matter what. If we have separate |
Description of Changes
In preparation for adding a index algo/kind that we'll call
direct
(backed byVec<Vec<RowPointer>>
, ...),this PR moves all the module bindings APIs (Rust + C#) to use
datastore_[delete_by_]index_scan_range_bsatn
and deprecates
datastore_[delete_by_]btree_scan_bsatn
.This more closely reflects what the datastore actually does today.
Nowhere (mostly because there's only a single index algo) does the datastore actually check that a btree index is used.
What the ABI actually is about is fast range queries.
The new
direct
index can also support that, so the more general name makes sense,while it is also beneficial for efficiency, as we can avoid a check.
After this change, there are no users of the deprecated ABIs, so we could elect to remove them just before 1.0,
but this PR leaves them be.
Some datastore types and methods are also renamed to reflect the new reality.
API and ABI breaking changes
None, for now.
Expected complexity level and risk
2, mostly simple renaming and code motion.
Testing
Existing tests should cover this.