Skip to content

Storages: downgrade some logs#10815

Open
JinheLin wants to merge 1 commit intopingcap:masterfrom
JinheLin:reduce_log
Open

Storages: downgrade some logs#10815
JinheLin wants to merge 1 commit intopingcap:masterfrom
JinheLin:reduce_log

Conversation

@JinheLin
Copy link
Copy Markdown
Contributor

@JinheLin JinheLin commented Apr 24, 2026

What problem does this PR solve?

Issue Number: close #10816

Problem Summary:

What is changed and how it works?


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 logging verbosity for internal resource scheduling operations by adjusting log output levels, resulting in cleaner logs with less noise.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

📝 Walkthrough

Walkthrough

A logging level adjustment in the segment read task scheduler reduces message verbosity by changing a pending pool submission status log from info to debug level, with no control flow changes.

Changes

Cohort / File(s) Summary
Logging Verbosity Adjustment
dbms/src/Storages/DeltaMerge/ReadThread/SegmentReadTaskScheduler.cpp
Changed the pending pool submission log message from info level to debug level, reducing output verbosity while preserving message content.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 The logs once sang at info's height,
Now whisper softly in the night,
Debug will hear the pending song,
While info rests, serene and strong. 🌙

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description follows the required template structure but lacks critical content in key sections. Add a problem summary explaining why the log level change is needed (e.g., issue #10816), fill the commit-message section with a clear description of the change, and check appropriate test/documentation checkboxes.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'Storages: downgrade some logs' accurately describes the main change - reducing log verbosity by downgrading a log level from info to debug in the storage layer.

✏️ 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
dbms/src/Storages/DeltaMerge/ReadThread/SegmentReadTaskScheduler.cpp (1)

71-77: ⚠️ Potential issue | 🟡 Minor

Logging macro level deviates from storage logging policy.

This change switches the event log to LOG_DEBUG, but this path’s guideline requires LOG_INFO with contextual fields in storage engine code. Please keep this as LOG_INFO (context is already good).

As per coding guidelines, dbms/src/Storages/**/{DeltaMerge,KVStore,Page,S3}/**/*.{h,hpp,cpp} should use LoggerPtr and LOG_INFO(log, ...) with relevant context.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dbms/src/Storages/DeltaMerge/ReadThread/SegmentReadTaskScheduler.cpp` around
lines 71 - 77, The log call uses LOG_DEBUG but must follow storage logging
policy and use LOG_INFO with the LoggerPtr; replace the LOG_DEBUG(...)
invocation with LOG_INFO(pool->getLogger(), "Submitted, pool_id={}
segment_count={} pending_pools={} cost={}ns", pool->pool_id,
pool->getPendingSegmentCount(), pending_pools.size(), sw.elapsed()) so the
storage code in SegmentReadTaskScheduler.cpp uses LOG_INFO and the existing
contextual fields (pool->getLogger(), pool->pool_id,
pool->getPendingSegmentCount(), pending_pools.size(), sw.elapsed()) remain
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@dbms/src/Storages/DeltaMerge/ReadThread/SegmentReadTaskScheduler.cpp`:
- Around line 71-77: The log call uses LOG_DEBUG but must follow storage logging
policy and use LOG_INFO with the LoggerPtr; replace the LOG_DEBUG(...)
invocation with LOG_INFO(pool->getLogger(), "Submitted, pool_id={}
segment_count={} pending_pools={} cost={}ns", pool->pool_id,
pool->getPendingSegmentCount(), pending_pools.size(), sw.elapsed()) so the
storage code in SegmentReadTaskScheduler.cpp uses LOG_INFO and the existing
contextual fields (pool->getLogger(), pool->pool_id,
pool->getPendingSegmentCount(), pending_pools.size(), sw.elapsed()) remain
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f2275723-4ecc-4c7d-b458-fc4bc7771959

📥 Commits

Reviewing files that changed from the base of the PR and between c6a40dd and fc4214b.

📒 Files selected for processing (1)
  • dbms/src/Storages/DeltaMerge/ReadThread/SegmentReadTaskScheduler.cpp

@JinheLin JinheLin changed the title Storages: reduce log Storages: downgrade some logs Apr 24, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Apr 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CalvinNeo

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:

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 added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 24, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Apr 24, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-24 08:54:20.943211836 +0000 UTC m=+2328866.148571903: ☑️ agreed by CalvinNeo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downgrade some logs

2 participants