Skip to content

eventcollector: clean up unused dispatcher timezone code - #6336

Open
lidezhu wants to merge 1 commit into
masterfrom
ldz/clean-timezone-code
Open

lidezhu wants to merge 1 commit into
masterfrom
ldz/clean-timezone-code

Conversation

@lidezhu

@lidezhu lidezhu commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #6335

What is changed and how it works?

Check List

Tests

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

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

Summary by CodeRabbit

  • Changes
    • Removed timezone information from dispatcher requests and shared dispatcher configuration.
    • Dispatcher registration and reset requests no longer include timezone data.
    • Reserved the former timezone field to prevent reuse in future protocol changes.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 22, 2026
@ti-chi-bot

ti-chi-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign charlescheung96 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 948bbb4c-4346-484a-bc04-9097ba6d1306

📥 Commits

Reviewing files that changed from the base of the PR and between f2e96bb and 518d246.

⛔ Files ignored due to path filters (1)
  • eventpb/event.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (9)
  • downstreamadapter/dispatcher/basic_dispatcher.go
  • downstreamadapter/dispatcher/basic_dispatcher_info.go
  • downstreamadapter/dispatcher/event_dispatcher_test.go
  • downstreamadapter/dispatchermanager/dispatcher_manager.go
  • downstreamadapter/dispatchermanager/dispatcher_manager_test.go
  • downstreamadapter/eventcollector/dispatcher_session.go
  • downstreamadapter/eventcollector/dispatcher_stat_test.go
  • downstreamadapter/eventcollector/event_collector_test.go
  • eventpb/event.proto
💤 Files with no reviewable changes (8)
  • downstreamadapter/dispatchermanager/dispatcher_manager.go
  • downstreamadapter/eventcollector/dispatcher_session.go
  • downstreamadapter/dispatcher/basic_dispatcher.go
  • downstreamadapter/eventcollector/event_collector_test.go
  • downstreamadapter/dispatcher/basic_dispatcher_info.go
  • downstreamadapter/dispatchermanager/dispatcher_manager_test.go
  • downstreamadapter/dispatcher/event_dispatcher_test.go
  • downstreamadapter/eventcollector/dispatcher_stat_test.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change removes timezone data from dispatcher interfaces, shared state, constructor calls, event registration and reset requests, test doubles, and the DispatcherRequest protobuf field. The protobuf field number and name are reserved.

Changes

Dispatcher timezone removal

Layer / File(s) Summary
Remove timezone from the event contract
eventpb/event.proto
DispatcherRequest no longer contains timezone = 15. Field number 15 and the name timezone are reserved.
Update dispatcher contracts and shared state
downstreamadapter/dispatcher/basic_dispatcher.go, downstreamadapter/dispatcher/basic_dispatcher_info.go, downstreamadapter/dispatchermanager/dispatcher_manager.go, downstreamadapter/dispatcher/*_test.go
GetTimezone and the SharedInfo.timezone field are removed. NewSharedInfo and its call sites no longer use a timezone argument.
Stop populating event request timezone
downstreamadapter/eventcollector/dispatcher_session.go, downstreamadapter/eventcollector/*_test.go
Register and reset requests no longer set Timezone. Test doubles no longer implement GetTimezone.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: asddongmen

Merge Risk: ⚪ Minimal · up to 518d2

The cleanup removes unused dispatcher timezone data without changing the remaining request fields, and preserves the protobuf field reservation. No production impact is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the issue reference, but the change summary, test selection or results, compatibility answers, documentation assessment, and release note are incomplete. Describe what changed and how it works. Select and document the applicable test type and results. Answer both questions about compatibility and documentation. Add a release note or state None.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 clearly and concisely describes the main change: removal of unused dispatcher timezone code from the event collector.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

A rabbit hops where timezones flew
The dispatcher sheds one field from view
Shared state grows slightly lean
Requests carry no timezone sheen
Reserved numbers guard the trail
Clean contracts now prevail

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

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

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eventcollector: clean up unused dispatcher timezone code

1 participant