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
ttl,partition: Stabilize test TestReorgPartExtensivePart #53017
base: master
Are you sure you want to change the base?
Conversation
It makes direct changes to table.Meta, which is later read by TTL Fixed by disable TTL and not trigger the TTL loop when disabled.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53017 +/- ##
=================================================
- Coverage 72.0365% 55.3057% -16.7309%
=================================================
Files 1499 1614 +115
Lines 431224 600894 +169670
=================================================
+ Hits 310639 332329 +21690
- Misses 101303 245704 +144401
- Partials 19282 22861 +3579
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hawkingrei The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
@@ -286,6 +286,9 @@ func (m *JobManager) jobLoop() error { | |||
} | |||
|
|||
func (m *JobManager) onTimerTick(se session.Session, rt *ttlTimerRuntime, syncer *TTLTimersSyncer, now time.Time) { | |||
if !variable.EnableTTLJob.Load() { |
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.
This line will make some logic changes. How about just stopping ttl manager in the tests? See:
tidb/pkg/ttl/ttlworker/job_manager_integration_test.go
Lines 823 to 828 in 6aef624
store, dom := testkit.CreateMockStoreAndDomain(t) | |
tk := testkit.NewTestKit(t, store) | |
// stop TTLJobManager to avoid unnecessary job schedule and make test stable | |
dom.TTLJobManager().Stop() | |
require.NoError(t, dom.TTLJobManager().WaitStopped(context.Background(), time.Minute)) |
The tests makes direct changes to table.Meta, which is later read by TTL. Fixed by disable TTL and not trigger the TTL loop when disabled.
What problem does this PR solve?
Issue Number: close #51845
Problem Summary:
What changed and how does it work?
Check List
Tests
Ran this on both a linux and a macOs box without issues.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.