-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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 testHistoryRetention #46799
Fix testHistoryRetention #46799
Conversation
Disable backgorund sync to ensure that the replica's retention lease isn't expired (in a slow run that runs into the 30s default background sync interval) before recovery and we get ops based recovery. Closes elastic#45953
Pinging @elastic/es-distributed |
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.
Good catch @original-brownbear, but I have a different idea for the fix. This test should work even if a retention lease sync happens. I think it would be better to suppress the reasonable-history check by setting index.recovery.file_based_threshold: 1.0
. We're already using the InternalSettingsPlugin
so it's just a case of using a different setting (see below).
server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java
Outdated
Show resolved
Hide resolved
…ecoveryIT.java Co-Authored-By: David Turner <[email protected]>
Thanks @DaveCTurner makes sense => applied your fix :) |
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
Suppress the reasonable-history check in this test to guarantee we're always getting ops based recovery even after a background sync. Closes elastic#45953 Co-Authored-By: David Turner <[email protected]>
Suppress the reasonable-history check in this test to guarantee we're always getting ops based recovery even after a background sync. Closes elastic#45953 Co-Authored-By: David Turner <[email protected]>
Suppress the reasonable-history check in this test to guarantee we're always getting ops based recovery even after a background sync. Closes #45953 Co-Authored-By: David Turner <[email protected]>
Suppress the reasonable-history check in this test to guarantee we're always getting ops based recovery even after a background sync. Closes #45953 Co-Authored-By: David Turner <[email protected]>
Disable backgorund sync to ensure that the replica's retention lease
isn't expired (in a slow run that runs into the 30s default background
sync interval) before recovery and we get ops based recovery as
expected.
Closes #45953
Note: See my reproducer for the original failure here #45953 (comment)
Relates #45208 which added the logic that is expiring the retention leases here