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

planner: add warn log for sync stats #36956

Merged
merged 16 commits into from
Aug 22, 2022
Merged

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Aug 8, 2022

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

add warn log for sync stats and recorded in slowlog

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 8, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • chrysan
  • xuyifangreeneyes

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 8, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Aug 8, 2022

@Yisaer Yisaer added the skip-issue-check Indicates that a PR no need to check linked issue. label Aug 8, 2022
@Yisaer Yisaer marked this pull request as ready for review August 8, 2022 03:52
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2022
@Yisaer Yisaer requested review from chrysan and xuyifangreeneyes and removed request for chrysan August 8, 2022 03:52
statistics/column.go Outdated Show resolved Hide resolved
statistics/column.go Outdated Show resolved Hide resolved
statistics/handle/handle_hist.go Outdated Show resolved Hide resolved
statistics/handle/handle_hist.go Outdated Show resolved Hide resolved
statistics/handle/handle_hist.go Outdated Show resolved Hide resolved
planner/core/plan_stats.go Outdated Show resolved Hide resolved
planner/core/plan_stats.go Outdated Show resolved Hide resolved
Signed-off-by: yisaer <disxiaofei@163.com>
@Yisaer Yisaer requested a review from a team as a code owner August 12, 2022 05:20
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 12, 2022
Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
statistics/handle/handle_hist.go Outdated Show resolved Hide resolved
@@ -85,6 +90,9 @@ func RequestLoadStats(ctx sessionctx.Context, neededHistItems []model.TableItemI
var timeout = time.Duration(waitTime)
err := domain.GetDomain(ctx).StatsHandle().SendLoadRequests(stmtCtx, neededHistItems, timeout)
if err != nil {
_, digest := stmtCtx.SQLDigest()
logutil.BgLogger().Warn("SendLoadRequests failed",
zap.String("digest", digest.String()), zap.Error(err))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about write this warn message to slow logs or statement summary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think record error detail in slowlog is a good choice, but I think it's proper to record a flag if sync stats failed in slow log.

Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
Signed-off-by: yisaer <disxiaofei@163.com>
Copy link
Contributor

@chrysan chrysan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test the failure path by UT or FT. Rest LGTM.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2022
Signed-off-by: yisaer <disxiaofei@163.com>
@Yisaer
Copy link
Contributor Author

Yisaer commented Aug 19, 2022

Please test the failure path by UT or FT. Rest LGTM.

updated

Signed-off-by: yisaer <disxiaofei@163.com>
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 22, 2022
@Yisaer
Copy link
Contributor Author

Yisaer commented Aug 22, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 3f44942

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 22, 2022
@ti-chi-bot ti-chi-bot merged commit 4cf7eee into pingcap:master Aug 22, 2022
@sre-bot
Copy link
Contributor

sre-bot commented Aug 22, 2022

TiDB MergeCI notify

🔴 Bad News! New failing [1] after this pr merged.
These new failed integration tests seem to be caused by the current PR, please try to fix these new failed integration tests, thanks!

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/integration-ddl-test 🟥 failed 1, success 5, total 6 7 min 40 sec New failing
idc-jenkins-ci/integration-cdc-test 🟢 all 36 tests passed 33 min Existing passed
idc-jenkins-ci-tidb/integration-common-test 🟢 all 17 tests passed 18 min Existing passed
idc-jenkins-ci-tidb/common-test 🟢 all 11 tests passed 14 min Existing passed
idc-jenkins-ci-tidb/tics-test 🟢 all 1 tests passed 7 min 11 sec Existing passed
idc-jenkins-ci-tidb/integration-compatibility-test 🟢 all 1 tests passed 6 min 7 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 5 min 23 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 5 min 2 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 57 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. skip-issue-check Indicates that a PR no need to check linked issue. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants