Skip to content

Improved stability of Ratis addMemberToGroup and testThresholdSnapshot UT#11717

Merged
OneSizeFitsQuorum merged 3 commits intomasterfrom
enhance_ratis_ut
Dec 15, 2023
Merged

Improved stability of Ratis addMemberToGroup and testThresholdSnapshot UT#11717
OneSizeFitsQuorum merged 3 commits intomasterfrom
enhance_ratis_ut

Conversation

@OneSizeFitsQuorum
Copy link
Copy Markdown
Contributor

For addMemberToGroup UT:

  • The previous UT operates the underlying state machine only after the leader is elected, and the state machine may not be fully restored at this time, thus making some subsequent judgments wrong. This PR changes to ensure that the Leader's state machine is not read until the leader is ready (i.e., the state machine is restored) to ensure that the CI environment does not fail

For testThresholdSnapshot UT:

  • In CI environment, some threads are scheduled slowly, requiring 3 chances to generate Snapshot may lead to instability, so this PR is changed to 12 times, which is as low as possible in CI environment with weak resource environment

Signed-off-by: OneSizeFitQuorum <tanxinyu@apache.org>
Signed-off-by: OneSizeFitQuorum <tanxinyu@apache.org>
Signed-off-by: OneSizeFitQuorum <tanxinyu@apache.org>
Copy link
Copy Markdown
Collaborator

@HxpSerein HxpSerein left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (b57f320) 49.08% compared to head (3d205dc) 49.10%.
Report is 10 commits behind head on master.

Files Patch % Lines
...tdb/consensus/iot/logdispatcher/LogDispatcher.java 14.28% 6 Missing ⚠️
...a/org/apache/iotdb/consensus/iot/IoTConsensus.java 72.72% 3 Missing ⚠️
...he/iotdb/consensus/iot/IoTConsensusServerImpl.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #11717      +/-   ##
============================================
+ Coverage     49.08%   49.10%   +0.01%     
- Complexity    24977    25011      +34     
============================================
  Files          2817     2824       +7     
  Lines        176805   177023     +218     
  Branches      21200    21219      +19     
============================================
+ Hits          86781    86920     +139     
- Misses        90024    90103      +79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@SzyWilliam SzyWilliam left a comment

Choose a reason for hiding this comment

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

+1.
Mr. OneSizeFitsQuorum is the true master of code!

@OneSizeFitsQuorum OneSizeFitsQuorum merged commit ac326a5 into master Dec 15, 2023
@OneSizeFitsQuorum OneSizeFitsQuorum deleted the enhance_ratis_ut branch December 15, 2023 02:19
SzyWilliam pushed a commit to SzyWilliam/iotdb that referenced this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants