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

[Backport 2.x] Fix flaky test SegmentReplicationWithNodeToNodeIndexShardTests#testReplicaClosesWhileReplicating_AfterGetCheckpoint #12741

Merged
merged 1 commit into from
Mar 22, 2024

Commits on Mar 20, 2024

  1. Fix flaky test SegmentReplicationWithNodeToNodeIndexShardTests#testRe…

    …plicaClosesWhileReplicating_AfterGetCheckpoint (#12695)
    
    This fixes a race condition in the test where the primary shard will still have an open file ref while shutting down.
    This happens because we are fetching file refs inside the resolveCheckpointInfoResponseListener method right  after calling beforeIndexShardClosed.
    BeforeIndexShardClosed will resolve replication listeners immediately and leave a possibility
    of the primary attempting shut down before those refs are closed. We can resolve this using latches, but this test really doesn't need to simulate a primary response at all so removed it entirely.
    
    Signed-off-by: Marc Handalian <[email protected]>
    (cherry picked from commit 5e2034c)
    Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored and mch2 committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    9078210 View commit details
    Browse the repository at this point in the history