-
Notifications
You must be signed in to change notification settings - Fork 22
eventService: improve metric collection logic #1376
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
eventService: improve metric collection logic #1376
Conversation
Signed-off-by: dongmen <414110582@qq.com>
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @asddongmen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello! Gemini here, providing a summary of this pull request to help everyone quickly understand the changes. Based on the title "eventStore: debug" and the patch content, it appears this PR is intended for debugging purposes within the eventStore
component, specifically related to the event broker's scan logic. The primary change involves temporarily commenting out a section of code that constrains the data scan range based on the table's DDL state. This modification seems aimed at observing behavior without this specific constraint, likely to diagnose an issue.
Highlights
- Debugging: This PR is tagged as a debugging effort for the
eventStore
component. - Event Broker Scan Logic: A specific part of the event broker's scan logic in
checkNeedScan
has been modified. - DDL State Constraint Commented Out: The code that limits the scan
EndTs
based on the table's DDL resolved timestamp has been commented out.
Changelog
- pkg/eventservice/event_broker.go
- Commented out lines 390-392 in the
checkNeedScan
function. This disables the logic that constrains the data scan range's end timestamp (dataRange.EndTs
) to the table's DDL state's resolved timestamp (ddlState.ResolvedTs
). This change is likely for debugging purposes.
- Commented out lines 390-392 in the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Code lines vanish, just for a while,
To see how the system will smile.
Debugging's the game,
To find fault or fame,
Then uncomment with a new style.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request, titled "eventStore: debug", comments out a critical piece of logic in the checkNeedScan
function. The PR description lacks details about the purpose and impact of this change, which makes it difficult to assess its intent fully.
The primary concern is the removal of the constraint that caps the dataRange.EndTs
by ddlState.ResolvedTs
(which is the schemaStore
's global resolved timestamp). This constraint appears vital for ensuring data consistency by preventing the system from scanning DML events beyond the point for which schema information is reliably resolved. Commenting this out could lead to correctness issues or performance degradation.
It's crucial to understand if this is a temporary debugging measure. If so, it should be clearly documented with a TODO and a plan for reversion. If it's intended as a permanent change, a thorough justification and analysis of its impact on correctness and performance are required.
Summary of Findings
- Potential Correctness Issue due to Removed DDL State Constraint: Commenting out the code that constrains
dataRange.EndTs
byddlState.ResolvedTs
incheckNeedScan
(pkg/eventservice/event_broker.go) is a critical concern. This may lead to scanning DML events beyond the schema store's resolved DDL state, potentially causing DMLs to be processed with stale schema information or leading to performance issues due to increased blocking inschemaStore.GetTableInfo
. This change needs strong justification or should be reverted. - Lack of Pull Request Context: The pull request title ("eventStore: debug") and description are insufficient to understand the intent, scope, and impact of the changes. Clearer communication is needed, especially for changes affecting core logic.
Merge Readiness
This pull request, in its current state, is not ready to be merged. The critical issue identified—commenting out the DDL state constraint—poses a significant risk to data correctness and system stability. This change must be reverted or a very compelling justification for its removal, along with evidence that correctness is not compromised, must be provided.
Additionally, the pull request lacks essential context in its title and description, making it difficult to review effectively. Please update the PR details to reflect the purpose and impact of these changes.
I am unable to approve this pull request. It should be thoroughly re-evaluated and potentially reverted before considering it for merge.
@gemini-code-assist[bot]: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
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. |
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
Signed-off-by: dongmen <414110582@qq.com>
@asddongmen: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, wk989898 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: ref #1307
What is changed and how it works?
Extract the metric collecting logic from
event_broker.go
to make the code more readable.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note