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

fix: prevent incorrect range queries when searching for a page version #1528

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

avinassh
Copy link
Member

@avinassh avinassh commented Jul 2, 2024

It is important to verify that the data we got from Foundation DB matches with what we want, since we are doing a range query.

for example, say we searched for ('db_name42', 10, 20). If this page does not exist, then it could match with ('db_name41', 10, 20) or with ('db_name42', 9, 20) since it does lexicographic search.

It is important to verify that the data we got from Foundation DB matches with what we
want, since we are doing a range query.

for example, say we searched for ('db_name42', 10, 20). If this page does not exist, then
it could match with ('db_name41', 10, 20) or with ('db_name42', 9, 20) since it does
lexicographic search.
Copy link
Collaborator

@MarinPostma MarinPostma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to prevent fetching a page we are not interested in?

@avinassh
Copy link
Member Author

avinassh commented Jul 2, 2024

is there a way to prevent fetching a page we are not interested in?

This query is checking index only for the right frame number for the page. It does not fetch the frame.

@avinassh avinassh enabled auto-merge July 2, 2024 16:54
@avinassh avinassh added this pull request to the merge queue Jul 2, 2024
Merged via the queue into tursodatabase:main with commit b988125 Jul 2, 2024
18 checks passed
@avinassh avinassh deleted the ss-read-boundary branch July 2, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants