Skip to content
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

statistics: kill in time when to mergeGlobalTopN with partition #45707

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions statistics/cmsketch.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@
// 1. Check the topN first.
// 2. If the topN doesn't contain the value corresponding to encodedVal. We should check the histogram.
for j := 0; j < partNum; j++ {
if atomic.LoadUint32(kiiled) == 1 {
return nil, nil, nil, errors.Trace(ErrQueryInterrupted)
}

Check warning on line 839 in statistics/cmsketch.go

View check run for this annotation

Codecov / codecov/patch

statistics/cmsketch.go#L838-L839

Added lines #L838 - L839 were not covered by tests
if (j == i && version >= 2) || topNs[j].findTopN(val.Encoded) != -1 {
continue
}
Expand Down