Skip to content

Reduce/downgrade some MPPTask logs (#10821)#10874

Open
ti-chi-bot wants to merge 3 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-10821-to-release-8.5
Open

Reduce/downgrade some MPPTask logs (#10821)#10874
ti-chi-bot wants to merge 3 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-10821-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

@ti-chi-bot ti-chi-bot commented May 28, 2026

This is an automated cherry-pick of #10821

What problem does this PR solve?

Issue Number: close #10820

Problem Summary:

What is changed and how it works?

Reduce some MPPTask logs

Check List

Tests

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

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Summary by CodeRabbit

  • Chores
    • Reduced noisy info-level logs to debug for task start and completion messages.
    • Added timing around task unregistration and escalate to info for slow operations.
    • Made task start logging conditional based on measured pre-run time to reduce verbosity.
    • Ensured completion logs default to debug and only escalate on failure or non-successful status.

Review Change Stack

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels May 28, 2026
@ti-chi-bot
Copy link
Copy Markdown
Member Author

@gengliqi This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented May 28, 2026

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

Details

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 ti-community-infra/tichi repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 42c25021-24ee-46f3-a06a-02c36358c881

📥 Commits

Reviewing files that changed from the base of the PR and between d84d06b and ebc78d1.

📒 Files selected for processing (1)
  • dbms/src/Flash/Mpp/MPPTask.cpp
💤 Files with no reviewable changes (1)
  • dbms/src/Flash/Mpp/MPPTask.cpp

📝 Walkthrough

Walkthrough

Log levels were reduced in MPPHandler and MPPTask; startup and unregister paths now measure elapsed time and only escalate logs to INFO when durations exceed thresholds; post-execution logging is initialized to DEBUG before conditional escalation.

Changes

MPP task logging optimization

Layer / File(s) Summary
Simple log level downgrades
dbms/src/Flash/Mpp/MPPHandler.cpp, dbms/src/Flash/Mpp/MPPTask.cpp
Handler completion log and destructor "finish MPPTask" message downgraded from LOG_INFO to LOG_DEBUG.
Performance-aware conditional logging
dbms/src/Flash/Mpp/MPPTask.cpp
unregisterTask() measures unregistration duration and logs INFO for slow operations (DEBUG otherwise); task startup computes combined pre-run time and logs at INFO only if above threshold; post-execution log level is reset to DEBUG before conditional escalation.

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Possibly related PRs:

    • pingcap/tiflash#10821: Related changes that also downgrade MPP logging and introduce timing-based log level adjustments.
  • Suggested reviewers:

    • windtalker
    • xzhangxian1008

"I nibble noisy logs away,
timing each hop and run,
quick hops hush to little squeaks,
slow ones shine in sun. 🐇✨"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: downgrading/reducing MPPTask logs, which matches the code changes that downgrade log levels from INFO to DEBUG.
Description check ✅ Passed The description follows the required template with all major sections populated including problem statement, changes summary, test checklist, and release notes, though the problem summary section is empty.
Linked Issues check ✅ Passed The PR successfully addresses the objective from issue #10820 to reduce MPPTask logs by downgrading log levels in MPPHandler.cpp and MPPTask.cpp from INFO to DEBUG.
Out of Scope Changes check ✅ Passed All code changes are scoped to reducing log verbosity in MPPTask-related files with no unrelated modifications present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dbms/src/Flash/Mpp/MPPTask.cpp`:
- Around line 586-591: The file contains unresolved Git conflict markers in
MPPTask::~MPPTask() and in runImpl() around the log-level setup — remove the
conflict markers (<<<<<<<, =======, >>>>>>>) and choose the correct code path:
in runImpl() ensure the log_level variable is properly declared/assigned
(restore either "auto log_level = Poco::Message::PRIO_DEBUG;" or the existing
"log_level = Poco::Message::PRIO_DEBUG;" depending on surrounding scope) and in
the destructor MPPTask::~MPPTask() pick and keep the intended implementation
block, deleting the alternate branch and markers so the file compiles cleanly;
search for MPPTask::~MPPTask and MPPTask::runImpl to locate and fix both hunks.
- Around line 155-159: There are unresolved merge conflict markers in MPPTask:
remove the conflict markers from MPPTask::~MPPTask and keep only LOG_DEBUG(log,
"finish MPPTask: {}", id.toString());, and in MPPTask::runImpl remove the
conflict markers so that only the intended single logging/code path remains
(ensure the consolidated use of the chosen log_level/logging statements in
runImpl rather than duplicated/conflicting branches); update both locations by
deleting the <<<<<<< / ======= / >>>>>>> lines and resulting dead code so the
file compiles cleanly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 61f9b77c-0818-4e3e-80bd-37cb2050ccc5

📥 Commits

Reviewing files that changed from the base of the PR and between 2560b3d and 770001a.

📒 Files selected for processing (2)
  • dbms/src/Flash/Mpp/MPPHandler.cpp
  • dbms/src/Flash/Mpp/MPPTask.cpp

Comment thread dbms/src/Flash/Mpp/MPPTask.cpp Outdated
Comment thread dbms/src/Flash/Mpp/MPPTask.cpp Outdated
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels May 29, 2026
u
Signed-off-by: gengliqi <gengliqiii@gmail.com>
Copy link
Copy Markdown
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot Bot added the lgtm label May 29, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gengliqi, windtalker

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [gengliqi,windtalker]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label May 29, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented May 29, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-05-29 05:53:11.063809845 +0000 UTC m=+590661.033974896: ☑️ agreed by gengliqi.
  • 2026-05-29 05:56:21.428269648 +0000 UTC m=+590851.398434710: ☑️ agreed by windtalker.

@ti-chi-bot ti-chi-bot Bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants