-
Notifications
You must be signed in to change notification settings - Fork 289
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
processor(ticdc): Extract all closures to make code maintainable #8337
processor(ticdc): Extract all closures to make code maintainable #8337
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
noSplitTxnEmitCondition | ||
} | ||
|
||
func (w *sinkWorker) doEmitAndAdvance( |
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.
How about
type TableSinkAdvancer struct {
events []*model.RowChangedEvent
currTxnCommitTs uint64,
lastTxnCommitTs uint64,
lastPos engine.Position,
batchID uint64,
committedTxnSize uint64,
pendingTxnSize uint64,
}
func (a *TableSinkAdvancer) advance(task *sinkTask, w *worker) {
}
func (a *TableSinkAdvancer) onTaskFinish(task *sinkTask) {
// handles logic about isLastTime.
}
So we can store TableSinkAdvancer
into TableSinkWrapper
, so we can do more boundary checks about task range. For example, Task boundaries should be contiguous.
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.
Yeap! We can do it in the next PR. Thanks!
Rest LGTM. Thank you very much! |
/run-all-tests |
…or' into rustin-patch-sink-manager-refactor
/run-all-tests |
3 similar comments
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-kafka-integration-test [2023-02-23T12:29:15.357Z] signal: segmentation fault (core dumped) |
/run-kafka-integration-test [2023-02-23T12:29:15.357Z] signal: segmentation fault (core dumped) |
BTW, will these refactors be cherry-picked to release-6.5? |
I think it is better to do it. Because we need to maintain 6.5 for a long time. So we can cherry-pick all changes and tests after I finished all work on the master. |
Thanks for your review! 💚 💙 💜 💛 ❤️ /merge |
This pull request has been accepted and is ready to merge. Commit hash: 6a52872
|
@hi-rustin: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
/run-integration-test Network issue |
/run-integration-test [2023-02-24T03:01:39.158Z] wait process cdc.test exit timeout [2023-02-24T03:01:39.158Z] count(*) 5000 [2023-02-24T03:01:39.158Z] Exiting on signal: INTERRUPT |
/run-integration-test unstable test |
What problem does this PR solve?
Issue Number: ref #8132
What is changed and how it works?
getUpperBound
only needs minimal info about the table sink. All we need issroterResolvedTs
Check List
Tests
Unit Test
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