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

robustness: only run MemberDowngrade test for high SnapshotCatchUpEntries #19160

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

siyuanfoundation
Copy link
Contributor

This should prevent snapshot from being sent in the test.
Tested locally for 100 times, did not see any flakiness.

#19147

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.80%. Comparing base (0edc5c0) to head (08e4d6d).
Report is 2 commits behind head on main.

Additional details and impacted files

see 18 files with indirect coverage changes

@@           Coverage Diff           @@
##             main   #19160   +/-   ##
=======================================
  Coverage   68.79%   68.80%           
=======================================
  Files         420      420           
  Lines       35649    35649           
=======================================
+ Hits        24526    24527    +1     
+ Misses       9695     9692    -3     
- Partials     1428     1430    +2     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0edc5c0...08e4d6d. Read the comment docs.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: serathius, siyuanfoundation

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@serathius
Copy link
Member

Awesome finding! Thanks @siyuanfoundation

@serathius serathius merged commit a228c12 into etcd-io:main Jan 10, 2025
38 checks passed
@ahrtr
Copy link
Member

ahrtr commented Jan 10, 2025

Nice, it's a better solution. Each member will have complete WAL records.

But theoretically, it's still possible that a follower may lag behind the leader more than the DefaultSnapshotCatchUpEntries in high traffic case, so the leader will still send a snapshot, although it's low possibility.

Tested locally for 100 times, did not see any flakiness.

The other reason why you do not see the error is 50% of downgrade cases out of the 100 tries were skipped due to the catchUpEntries too small.

@serathius
Copy link
Member

serathius commented Jan 10, 2025

The other reason why you do not see the error is 50% of downgrade cases out of the 100 tries were skipped due to the catchUpEntries too small.

My assumption it was 100 runs without the skip

@ahrtr
Copy link
Member

ahrtr commented Jan 10, 2025

My assumption it was 100 runs without the skip

In this PR, it set two snapCatchUpEntries (100, etcdserver.DefaultSnapshotCatchUpEntries), while robustness randomly selects one of them, so it's 50% possibilities? Once 100 is selected, then the downgrade test is skipped.

Anyway, it's already good enough. Up to your guys to decide whether & how to enhance it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants