-
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
*: remove limiting process id for auto analyze #54902
*: remove limiting process id for auto analyze #54902
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54902 +/- ##
================================================
+ Coverage 72.7907% 73.3113% +0.5206%
================================================
Files 1558 1568 +10
Lines 438406 446381 +7975
================================================
+ Hits 319119 327248 +8129
+ Misses 99643 98700 -943
- Partials 19644 20433 +789
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@@ -854,7 +855,9 @@ func readDataAndSendTask(ctx sessionctx.Context, handler *tableResultHandler, me | |||
for { | |||
failpoint.Inject("mockKillRunningV2AnalyzeJob", func() { |
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.
Here are the tests.
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
8855661
to
2a68900
Compare
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
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.
reservedConnAnalyze
can be removed. Rest LGTM~
Signed-off-by: Weizhen Wang <[email protected]>
I have removed it. Thanks. |
var GlobalAutoAnalyzeProcessList = newGlobalAutoAnalyzeProcessList() | ||
|
||
type globalAutoAnalyzeProcessList struct { | ||
processes map[uint64]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.
We use global thread-safe map to record the running auto analyze task.
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.
why not use a sync.map
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.
The Map type is optimized for two common use cases: (1) when the entry for a given key is only ever written once but read many times, as in caches that only grow, or (2) when multiple goroutines read, write, and overwrite entries for disjoint sets of keys. In these two cases, use of a Map may significantly reduce lock contention compared to a Go map paired with a separate Mutex or RWMutex.
so two common use cases are not the same as us.
@winoros PTAL |
Signed-off-by: Weizhen Wang <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance6716, pingyu, qw4990, xhebox 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 |
Signed-off-by: Weizhen Wang <[email protected]>
What problem does this PR solve?
Issue Number: ref #53460
Problem Summary:
What changed and how does it work?
GlobalAutoAnalyzeProcessList
to collect all auto analyze process IDs.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.