-
Notifications
You must be signed in to change notification settings - Fork 180
Implement one-batch lookahead for index enumerators #4345
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
Implement one-batch lookahead for index enumerators #4345
Conversation
Signed-off-by: Simeon Widdis <[email protected]>
|
Security IT failures are confusing me here -- seems like they're all consistently failing but the changed code doesn't show up anywhere in any of the stack traces |
…atches-in-enumeration
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
…atches-in-enumeration
|
Turns out I flipped the benchmark in my head, so this is overall a regression -- going to put back in draft and figure out a better approach |
…atches-in-enumeration
|
This PR is stalled because it has been open for 2 weeks with no activity. |
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.19-dev 2.19-dev
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.19-dev
# Create a new branch
git switch --create backport/backport-4345-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d28c226140f1b98db4ed8e8d76d6451f2072273f
# Push it to GitHub
git push --set-upstream origin backport/backport-4345-to-2.19-dev
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.19-devThen, create a pull request where the |
@Swiddis , do you mean the current implementation has performance regression? So why the PR merged finally? If there is no regression, please backport it to 2.19-dev since backporting of #4884 is blocked by this backporting. |
|
Couldn't get the regression to reliably repro & the regression was smaller than the gains in more tests, so I wanted to see what the diff was in the OSB benchmarks. I don't see any benchmark diff since merging. Wasn't planning on backporting this originally since it's still largely experimental, can open the PR at least |
…ct#4345) Signed-off-by: Simeon Widdis <[email protected]>


Description
In local benchmarking of merge operations, I saw we were spending a lot of time waiting for synchronous fetching of batches across both indices.
Because of the PIT-based design, we can't parallelize page fetches directly, but one low-hanging fruit here is to start fetching the next batch as soon as we get the current one, so by the time we start the next batch it'll already be halfway ready. This cuts enumerated merge times by ~40%.
To implement this safely, this PR needs to do a few things:
SQLPlugin.javachanges. I also fixed our thread configuration settings.OpenSearchClient.java, I did several plumbing changes around that update.BackgroundSearchScanner.javaSome alternatives for the long-term:
In draft pending testing.
Related Issues
N/A
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.