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 testAllocationWithDisruption flakyness #6838

Merged
merged 3 commits into from
Mar 27, 2023

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Mar 26, 2023

Description

The existing flakyness was due to condition when smaller number of nodes were added but more number of nodes were stopped resulting in lesser number of nodes where re-balance is not possible due to SameShardAllocationDecider. This test changes:

  1. Stop same number of nodes as were added.
  2. Start with more number of nodes so that relocations are not prevented by SameShardAllocationDecider
  3. Cleanup unused vars & add useful logs

Issues Resolved

Resolves #6565

Testing

Ran the test in continuation with this fix, the test is not failing anymore (ran 800 times without failure).

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.discovery.StableClusterManagerDisruptionIT.testStaleClusterManagerNotHijackingMajority

@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2023

Codecov Report

Merging #6838 (7002c88) into main (07565ad) will increase coverage by 0.07%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6838      +/-   ##
============================================
+ Coverage     70.65%   70.73%   +0.07%     
- Complexity    59162    59220      +58     
============================================
  Files          4812     4812              
  Lines        283615   283615              
  Branches      40896    40896              
============================================
+ Hits         200394   200615     +221     
+ Misses        66764    66565     -199     
+ Partials      16457    16435      -22     

see 488 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

…es of primary accumulation on one node

Signed-off-by: Suraj Singh <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Suraj Singh <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.allocation.AwarenessAllocationIT.testThreeZoneOneReplicaWithForceZoneValueAndLoadAwareness

@dreamer-89 dreamer-89 merged commit 7500270 into opensearch-project:main Mar 27, 2023
@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Mar 27, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 27, 2023
* [Segment Replication] Fix testAllocationWithDisruption flakyness

Signed-off-by: Suraj Singh <[email protected]>

* Use more number of nodes with lesser primary shards to decrease chances of primary accumulation on one node

Signed-off-by: Suraj Singh <[email protected]>

* Update comment

Signed-off-by: Suraj Singh <[email protected]>

---------

Signed-off-by: Suraj Singh <[email protected]>
(cherry picked from commit 7500270)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dreamer-89 pushed a commit that referenced this pull request Mar 27, 2023
…) (#6847)

* [Segment Replication] Fix testAllocationWithDisruption flakyness



* Use more number of nodes with lesser primary shards to decrease chances of primary accumulation on one node



* Update comment



---------


(cherry picked from commit 7500270)

Signed-off-by: Suraj Singh <[email protected]>
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>
mitrofmep pushed a commit to mitrofmep/OpenSearch that referenced this pull request Apr 5, 2023
…nsearch-project#6838)

* [Segment Replication] Fix testAllocationWithDisruption flakyness

Signed-off-by: Suraj Singh <[email protected]>

* Use more number of nodes with lesser primary shards to decrease chances of primary accumulation on one node

Signed-off-by: Suraj Singh <[email protected]>

* Update comment

Signed-off-by: Suraj Singh <[email protected]>

---------

Signed-off-by: Suraj Singh <[email protected]>
Signed-off-by: Valentin Mitrofanov <[email protected]>
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] Flaky test failure SegmentReplicationAllocationIT.testAllocationWithDisruption
4 participants