-
Notifications
You must be signed in to change notification settings - Fork 188
*: fix context usage for SQL operation #377
Conversation
/run-all-tests tidb=release-3.0 |
1 similar comment
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
Codecov Report
@@ Coverage Diff @@
## master #377 +/- ##
================================================
+ Coverage 57.6207% 57.6451% +0.0244%
================================================
Files 163 163
Lines 16442 16468 +26
================================================
+ Hits 9474 9493 +19
- Misses 6047 6052 +5
- Partials 921 923 +2 |
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
@WangXiangUSTC @GregoryIan PTAL |
/run-all-tests tidb=release-3.0 |
@WangXiangUSTC @GregoryIan PTAL again. NOTE: I do not rename |
LGTM |
In addition to the db operation, are there any operations that will block dm-ctl operation? |
I think we should add a chaos case to verify this pr, make sure it has enough full and incremental data and run long enough, while doing various operations( |
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.
rest LGTM
@@ -349,7 +347,12 @@ func (cp *RemoteCheckPoint) Count() (int, error) { | |||
} | |||
|
|||
func (cp *RemoteCheckPoint) String() string { |
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.
I think we can refine this function later, it used to log, but need visit the database, maybe we can just use information saved in RemoteCheckPoint
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.
agree.
syncer/syncer.go
Outdated
err := s.checkpoint.FlushPointsExcept(exceptTables, shardMetaSQLs, shardMetaArgs) | ||
|
||
// when canceling (stop-task/pause-task), we still need to flush the checkpoint. | ||
timeout, err := time.ParseDuration(maxDMLConnectionTimeout) |
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.
we can define a new variable with time.Duration
type, and then don't need parse every time.
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.
addressed in f59a6aa.
/run-all-tests tidb=release-3.0 |
1 similar comment
/run-all-tests tidb=release-3.0 |
LGTM |
/run-all-tests tidb=release-3.0 |
2 similar comments
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
What problem does this PR solve?
when retrying SQL operation to downstream,
stop-task
/pause-task
may not take effect because of the misuse of context.What is changed and how it works?
fix context usage for SQL operation to downstream, including:
NOTE:
retry_cancel
integration testing has much wait time, and I'll split it run separately in CI after received 2 LGTM.Check List
Tests
Side effects
Related changes