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

Paging support for search #1150

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Paging support for search #1150

merged 3 commits into from
Apr 9, 2024

Conversation

habdelra
Copy link
Contributor

@habdelra habdelra commented Apr 8, 2024

This PR provides paging support for our searches. SQLite running in worker thread does not support cursors as there is not a way to serialize cursors over the postMessage boundary. So instead each search result returns the realm version that the search query ran against. For subsequent pages we can provide the realm version of the first page of results to hold the result set stable while we page through it. There was a minor adjustment to only cleanup old realm versions on generation changes instead of each update to the index so that older versions can remain available for pagination. It's not possible to paginate thru a generation change, but that should be fine since generation changes only happen when the realm does a full index which is during realm startup.

Copy link

github-actions bot commented Apr 8, 2024

Test Results

584 tests  +1   580 ✔️ +1   8m 13s ⏱️ -17s
    1 suites ±0       4 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 6573dc6. ± Comparison against base commit 3bedc51.

@habdelra habdelra merged commit fe40346 into main Apr 9, 2024
18 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cs-6654-paginate-search-results branch April 9, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants