-
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
executor,util: Stat inner/inter zone network traffic for MPP tasks #58683
Conversation
Hi @yibin87. 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. |
5520711
to
7f85071
Compare
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
94d41eb
to
46f323a
Compare
Signed-off-by: yibin87 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58683 +/- ##
================================================
+ Coverage 73.1194% 73.1372% +0.0178%
================================================
Files 1677 1685 +8
Lines 463911 472577 +8666
================================================
+ Hits 339209 345630 +6421
- Misses 103860 105983 +2123
- Partials 20842 20964 +122
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
/test check-dev |
@yibin87: 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. |
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
return | ||
} | ||
tiflashNetworkStats := runtimeStatsColl.GetStmtCopRuntimeStats().TiflashNetworkStats | ||
if tiflashNetworkStats == nil { |
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 we can dirctly return when tiflashNetworkStats == nil
without setting tikv detail?
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.
Set tikv details here to record mpp network traffic. When tiflashNetworkStats is nil, which means there is no mpp network traffic recorded, thus no need to set a default value tikv detail.
h.exchangeZoneInfo[*exec.ExecutorId] = zoneInfos | ||
} | ||
for i := 0; i < slots; i++ { | ||
sameZoneFlags = append(sameZoneFlags, len(zoneInfos[i]) == 0 || h.currentTaskZone == zoneInfos[i]) |
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.
When will len(zoneInfos[i])
be 0?
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.
when the respond tiflash node doesn't have zone label, in this situation, "" will be filled.
children = append(children, exec.TopN.Child) | ||
case tipb.ExecType_TypeLimit: | ||
children = append(children, exec.Limit.Child) | ||
case tipb.ExecType_TypeExchangeSender: |
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.
Most of codes in sender and receiver are similiar, I think wemay create a function to unify them.
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.
Yeah, I'll try
for _, tiflashStore := range allTiFlashStores { | ||
tiflashStoreAddr := tiflashStore.GetAddr() | ||
if tiflashZone, isSet := tiflashStore.GetLabelValue(placement.DCLabelKey); isSet { | ||
h.allTiflashZoneInfo[tiflashStoreAddr] = tiflashZone |
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.
allTiflashZoneInfo
seems to be repeated initialized in multi zoneHelpers. Maybe we can init allTiflashZoneInfo
in one place for only once.
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.
Good point, I'll change it.
Signed-off-by: yibin87 <[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.
LGTM
Signed-off-by: yibin87 <[email protected]>
go.mod
Outdated
@@ -330,3 +330,4 @@ replace ( | |||
sourcegraph.com/sourcegraph/appdash => github.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 | |||
sourcegraph.com/sourcegraph/appdash-data => github.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 | |||
) | |||
|
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 add an extra blank line here
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
pkg/executor/adapter.go
Outdated
a.GoCtx = context.WithValue(a.GoCtx, util.ExecDetailsKey, tikvExecDetailRaw) | ||
} | ||
|
||
tikvExecDetail = *(tikvExecDetailRaw.(*util.ExecDetails)) |
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 looks to me that tikvExecDetail
is just a local variable who's value is copied from tikvExecDetailRaw, is that the expected behavior?
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.
Good catch, changed to pointer type
return helper | ||
} | ||
|
||
/*func (h *taskZoneInfoHelper) tryQuickFillWithUncertainZones(exec *tipb.Executor, slots int, sameZoneFlags []bool) (bool, []bool) { |
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 keep this?
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
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[email protected]>
Signed-off-by: yibin87 <[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.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: windtalker, xzhangxian1008 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 |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: close #58682
Problem Summary:
What changed and how does it work?
Manual tests
Slow Log Test will be done in #59041
Execution Summary Test: 3 TiFlash Nodes, zone labels: [east, east, west]
TPCH-10, Q1
Tidb Zone east
Tidb Zone west
For ExchangeSender_51, all data are sent to one west tiflash node
Tidb Zone west, fine grained count = 8
For ExchangeSender_51, all data are sent to one west tiflash node
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.