Skip to content

[release-8.5] log(logger): only write sarama logs at debug level - #6986

Merged
ti-chi-bot[bot] merged 7 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-6982-to-release-8.5
Nov 25, 2026
Merged

ti-chi-bot[bot] merged 7 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-6982-to-release-8.5

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

This is an automated cherry-pick of #6982

What problem does this PR solve?

Issue Number: close #6983

What is changed and how it works?

  • initSaramaLogger always installs the zap adapter instead of swapping in an io.Discard logger at info and above; sarama messages are written at debug level, so the log level alone decides whether they show up.
  • Because the adapter is kept, switching the level at runtime (/api/v2/log) turns sarama output on without a restart.
  • The level parameter of initSaramaLogger is dropped; initOptionalComponent parses the level only for the gRPC logger.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Start a capture at info, write to sarama.Logger, and confirm nothing is written; then set the level to debug and confirm the message shows up.

Questions

Will it cause performance regression or break compatibility?

No.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

None

Summary by CodeRabbit

  • Bug Fixes
    • Sarama log messages are now consistently routed through the application’s logging system at debug level, rather than being discarded or logged at the configured level. This may make additional Sarama diagnostic messages available in logs.

Signed-off-by: ti-chi-bot <ti-chi-bot@users.noreply.github.com>
@ti-chi-bot ti-chi-bot Bot added lgtm release-note-none Denotes a PR that doesn't merit a release note. labels Nov 25, 2026
@ti-chi-bot ti-chi-bot Bot added do-not-merge/cherry-pick-not-approved 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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 25, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown
Author

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

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2d145265-496d-46b9-9949-b6cbd47f33cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. labels Nov 25, 2026
@3AceShowHand

Copy link
Copy Markdown
Collaborator

/cherry-pick-invite

@ti-chi-bot

ti-chi-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown
Author

@3AceShowHand: Please accept the invitation, then you can push to the cherry-pick pull requests. Comment with /cherry-pick-invite if the invitation expired. https://github.com/ti-chi-bot/ticdc/invitations

Details

In response to this:

/cherry-pick-invite

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.

@ti-chi-bot

Copy link
Copy Markdown
Member

Cherry-pick conflicts appear resolved; removing the do-not-merge/hold label.

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2026
@ti-chi-bot

ti-chi-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown
Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand

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 approved cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Nov 25, 2026
@3AceShowHand

Copy link
Copy Markdown
Collaborator

/hold

@ti-chi-bot ti-chi-bot Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2026
@ti-chi-bot

Copy link
Copy Markdown
Member

Cherry-pick conflicts appear resolved; removing the do-not-merge/hold label.

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2026
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 25, 2026
@3AceShowHand

Copy link
Copy Markdown
Collaborator

/test all

@3AceShowHand

Copy link
Copy Markdown
Collaborator

/unhold

@ti-chi-bot
ti-chi-bot Bot merged commit f3a57c1 into pingcap:release-8.5 Nov 25, 2026
20 checks passed
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. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm 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. 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.

2 participants