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

Fix testHistoryRetention #46799

Conversation

original-brownbear
Copy link
Member

@original-brownbear original-brownbear commented Sep 18, 2019

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

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
@original-brownbear original-brownbear added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Sep 18, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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).

@original-brownbear
Copy link
Member Author

Thanks @DaveCTurner makes sense => applied your fix :)

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@original-brownbear original-brownbear merged commit b0e0f97 into elastic:master Sep 18, 2019
@original-brownbear original-brownbear deleted the fix-history-retention-lease-rec branch September 18, 2019 09:03
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Sep 18, 2019
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]>
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Sep 18, 2019
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]>
original-brownbear added a commit that referenced this pull request Sep 18, 2019
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]>
original-brownbear added a commit that referenced this pull request Sep 18, 2019
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]>
@colings86 colings86 added v7.4.0 and removed v7.4.1 labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. >test Issues or PRs that are addressing/adding tests v7.4.0 v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI IndexRecoveryIT. testHistoryRetention failure
5 participants