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

[Segment Replication] Fix flaky tests in SegmentReplicationPressureIT #6868

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

Poojita-Raj
Copy link
Contributor

Description

In the previous tests for segmentReplicationPressureIT, the tests covered situations where it expected replicas to be stale and fail behind. However, it didn't take automatic background refreshes that take place at a refresh interval into account. Therefore, in certain situations where we expected the replica to be only 1 or 2 checkpoints behind due to indexing docs, it was actually 3 or 4 checkpoints behind due to checkpoints being sent on automatic refresh as well.

This caused all the replicas to turn stale and the tests to fail intermittently. By turning off the automatic refresh, we now control when we expect the refreshes to take place which fixes the issue. Ran the tests over 2000 times to check with no failures.

Issues Resolved

Resolves #6671

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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: Poojita Raj <poojiraj@amazon.com>
Copy link
Member

@dreamer-89 dreamer-89 left a comment

Choose a reason for hiding this comment

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

LGTM!

@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Mar 29, 2023
@Rishikesh1159 Rishikesh1159 merged commit 7b708c4 into opensearch-project:main Mar 29, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 29, 2023
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
(cherry picked from commit 7b708c4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dreamer-89 pushed a commit that referenced this pull request Mar 29, 2023
(cherry picked from commit 7b708c4)

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
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>
Rishikesh1159 added a commit to Rishikesh1159/OpenSearch that referenced this pull request Mar 30, 2023
mitrofmep pushed a commit to mitrofmep/OpenSearch that referenced this pull request Apr 5, 2023
)

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Valentin Mitrofanov <mitrofmep@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SegmentReplicationPressureIT flaky test
3 participants