-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add extension point for custom TranslogDeletionPolicy in EnginePlugin. #1404
Add extension point for custom TranslogDeletionPolicy in EnginePlugin. #1404
Conversation
This change adds a method that can be used to provide a custom TranslogDeletionPolicy. It also removes the deprecated settings for translog pruning based on retention leases. Signed-off-by: Rabi Panda <adnapibar@gmail.com>
Can one of the admins verify this patch? |
✅ Gradle Wrapper Validation success d521adf |
✅ DCO Check Passed d521adf |
✅ Gradle Precommit success d521adf |
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.
This is looking good. Just a few important things:
- We need to retain "read only" bwc support for the CCR setting until OpenSearch 3.0
- Let's keep this PR simple to just adding the TranslogDeletionPolicy extension point and address retention lease setting removal in a separate PR
server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
✅ Gradle Wrapper Validation success 912504d |
✅ DCO Check Passed 912504d |
✅ Gradle Precommit success 912504d |
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.
nice!
server/src/test/java/org/opensearch/index/engine/EngineConfigFactoryTests.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/index/engine/EngineConfigFactoryTests.java
Show resolved
Hide resolved
start gradle check |
server/src/main/java/org/opensearch/index/engine/EngineConfig.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
✅ DCO Check Passed 1c39d8c |
✅ Gradle Wrapper Validation success 1c39d8c |
✅ Gradle Precommit success 1c39d8c |
start gradle check |
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.
Took a first pass, LGTM and thanks for the tests :)
Will take another pass with all other related PRs.
Merged as is to let this bake in random testing. Let's iterate any changes, additions, bugs in separate PRs. |
#1404) This commit adds a method that can be used to provide a custom TranslogDeletionPolicy from within plugins that implement the EnginePlugin interface. This enables plugins to provide a custom deletion policy with the current limitation that only one plugin can override the policy. An exception will be thrown if more than one plugin overrides the policy. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
…in EnginePlugin (#1404) (#1424) * Add extension point for custom TranslogDeletionPolicy in EnginePlugin. (#1404) This commit adds a method that can be used to provide a custom TranslogDeletionPolicy from within plugins that implement the EnginePlugin interface. This enables plugins to provide a custom deletion policy with the current limitation that only one plugin can override the policy. An exception will be thrown if more than one plugin overrides the policy. Signed-off-by: Rabi Panda <adnapibar@gmail.com> * Close first engine instance before creating second (#1457) When creating the second instance of an InternalEngine using the same translog config of the default InternalEngine instance, the second instance will attempt to delete all the existing translog files. I found a deterministic test failure when running with the seed `E3E6AAD95ABD299B`. As opposed to creating a second engine instance with a different translog location, just close the first one before creating the second. Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
… retention leases (#209) * Provide a custom TranslogDeletionPolicy for translog pruning based on retention leases. This commit overrides the new getCustomTranslogDeletionPolicyFactory method of the EnginePlugin to provide a custom TranslogDeletionPolicy. The extension is added as part of OpenSearch 1.2 (opensearch-project/OpenSearch#1404). Signed-off-by: Rabi Panda <pandarab@amazon.com>
Description
This change adds a method that can be used to provide a custom TranslogDeletionPolicy.
It also removes the deprecated settings for translog pruning based on retention leases.The removal of deprecated settings and CCR specific logic will be done as part of a separate PR.Issues Resolved
Resolves #1260
Check List
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.
Signed-off-by: Rabi Panda adnapibar@gmail.com