-
Notifications
You must be signed in to change notification settings - Fork 141
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
Delegate Flint index vacuum operation to Spark #2985
Delegate Flint index vacuum operation to Spark #2985
Conversation
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
if (flintIndexMetadata.getFlintIndexOptions().isExternalScheduler()) { | ||
asyncQueryScheduler.removeJob(flintIndexMetadata.getOpensearchIndexName()); | ||
} |
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.
Confirmed with @noCharger that this will be added to Flint Spark later.
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.
LGTM, let's make sure all code path related to VACUUM removed
.thenReturn(acknowledgedResponse); | ||
when(acknowledgedResponse.isAcknowledged()).thenReturn(true); | ||
|
||
openSearchFlintIndexClient.deleteIndex("test-index"); |
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 are some use case for FlintIndexClient and its deleteIndex now that we don't have vacuum handled over here
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.
I'm not sure when we added this FlintIndexClient
abstraction. It seems useful in future. Let me know if we want to remove it now. cc: @ykmr1224
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.
I think we can remove it now.
Sure, will double check. Thanks! |
Only BWC failed. Same as |
* Remove vacuum dispatch and update UT Signed-off-by: Chen Dai <[email protected]> * Remove unused code and test Signed-off-by: Chen Dai <[email protected]> * Fix jacoco test Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 83e89fb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.17
# Create a new branch
git switch --create backport/backport-2985-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 83e89fb0f6a659b6cf5877d14ef260438b459c61
# Push it to GitHub
git push --set-upstream origin backport/backport-2985-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.17 Then, create a pull request where the |
* Remove vacuum dispatch and update UT Signed-off-by: Chen Dai <[email protected]> * Remove unused code and test Signed-off-by: Chen Dai <[email protected]> * Fix jacoco test Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]>
* Remove vacuum dispatch and update UT * Remove unused code and test * Fix jacoco test --------- (cherry picked from commit 83e89fb) Signed-off-by: Chen Dai <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#2985) (#2995) * Remove vacuum dispatch and update UT * Remove unused code and test * Fix jacoco test --------- Signed-off-by: Chen Dai <[email protected]>
Description
Currently, Flint index vacuum operation was handled by the SQL plugin to avoid launching a Spark job. This was introduced in #2557 to:
As a result, the vacuum logic in the SQL plugin became a duplicate of that in Spark. With the need for checkpoint cleanup, handling this in the SQL plugin became impractical. This PR removes the redundant logic from the SQL plugin and fully delegates the vacuum operation to Flint Spark.
Testing
Deployed OpenSearch and SQL 3.0 to an EC2 instance and tested with Flint Spark 0.6 in EMR-S as below:
Related Issues
Resolves opensearch-project/opensearch-spark#580
Check List
--signoff
.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.