tarantool / tarantool/tarantool
Optimize BPS tree for point lookups
Open
Nobody has claimed this yet.
feature
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Add a new API method to BPS tree to remove the code like this:
struct tree_mem_key tree_key;
tree_key.stmt = itr->key;
tree_key.lsn = (*itr->p_read_view)->vlsn;
bool exact;
struct vy_mem_tree_iterator mem_itr =
vy_mem_tree_lower_bound(&mem->tree, &tree_key, &exact);
itr->index->stat.memory.iterator.lookup++;
const struct tuple *stmt = NULL;
if (!vy_mem_tree_iterator_is_invalid(&mem_itr)) {
stmt = *vy_mem_tree_iterator_get_elem(&mem->tree, &mem_itr);
if (vy_stmt_compare(stmt, itr->key, mem->cmp_def) != 0)
stmt = NULL;
}
Contributor 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.
Research direction
Start at the shown vy_mem_tree_lower_bound call and trace the BPS tree implementation and its callers. Define the new point-lookup API around the key, LSN, and exact-match check shown, then verify that existing lookup behavior and statistics remain correct with focused tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- databases, performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100