-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
br: add chaos testing for advancer owner #58183
br: add chaos testing for advancer owner #58183
Conversation
Skipping CI for Draft Pull Request. |
Hi @Tristan1900. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: Wenqi Mou <[email protected]>
2e8a8eb
to
751f81c
Compare
@@ -11,18 +11,19 @@ import ( | |||
const ( | |||
flagBackoffTime = "backoff-time" | |||
flagTickInterval = "tick-interval" | |||
flagFullScanDiffTick = "full-scan-tick" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed since not used
@@ -270,11 +270,6 @@ func (c *CheckpointAdvancer) WithCheckpoints(f func(*spans.ValueSortedFull)) { | |||
f(c.checkpoints) | |||
} | |||
|
|||
// only used for test | |||
func (c *CheckpointAdvancer) NewCheckpoints(cps *spans.ValueSortedFull) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed since not used
Signed-off-by: Wenqi Mou <[email protected]>
@@ -149,7 +149,6 @@ func TestDaemon(t *testing.T) { | |||
ow.RetireOwner() | |||
req.False(ow.IsOwner()) | |||
app.AssertNotRunning(1 * time.Second) | |||
ow.CampaignOwner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't need to campaign again to become leader since only one node
@@ -458,13 +457,6 @@ func (b *AtomicBool) UnmarshalText(text []byte) error { | |||
return nil | |||
} | |||
|
|||
// LogBackup is the config for log backup service. | |||
// For now, it includes the embed advancer. | |||
type LogBackup struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused
Signed-off-by: Wenqi Mou <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58183 +/- ##
================================================
+ Coverage 73.1461% 74.6813% +1.5352%
================================================
Files 1675 1700 +25
Lines 461870 485247 +23377
================================================
+ Hits 337840 362389 +24549
+ Misses 103283 100775 -2508
- Partials 20747 22083 +1336
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@BornChanger please take another look when you get a chance, thanks! |
@@ -49,14 +57,19 @@ func DefineFlagsForCheckpointAdvancerConfig(f *pflag.FlagSet) { | |||
"If the checkpoint lag is greater than how long, we would try to poll TiKV for checkpoints.") | |||
f.Duration(flagCheckPointLagLimit, DefaultCheckPointLagLimit, | |||
"The maximum lag could be tolerated for the checkpoint lag.") | |||
|
|||
// used for chaos testing | |||
f.Duration(flagOwnershipCycleInterval, DefaultOwnershipCycleInterval, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we hide the parameter?
f.MarkHidden(flagOwnershipCycleInterval)
[LGTM Timeline notifier]Timeline:
|
@Tristan1900: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Signed-off-by: Wenqi Mou <[email protected]>
Signed-off-by: Wenqi Mou <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BornChanger, Leavrth, yudongusa 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 |
/retest |
@Tristan1900: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What problem does this PR solve?
Issue Number: close #50458
Problem Summary:
What changed and how does it work?
Add a cycle to force to be owner and retire when using
log advancer
cmd. In the test we can start this debugging command and it will do this cycle repeatedly until exits. It creates a chaos scenario for advancer testing.Also all the parameters in the advancer are exposed to the cmd already which is convenient. The advancer daemon running on TiDB domain will not be affected by any of these configs since they use default and cannot be configured.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.