Skip to content
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

fb/latency(cdc): agent to be table state awared, to handle different p2p messages. #5820

Merged
merged 32 commits into from
Jun 14, 2022

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Jun 9, 2022

What problem does this PR solve?

Issue Number: ref #4757

What is changed and how it works?

let the agent handle different table state, this makes the message report table's state more accurate.

Check List

Tests

  • Unit test

Questions

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

Release note

`None`.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 9, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • overvenus

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 9, 2022
@3AceShowHand 3AceShowHand changed the base branch from master to fb/latency June 9, 2022 14:46
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 9, 2022
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 9, 2022
@3AceShowHand 3AceShowHand changed the title fb/latency(cdc): agent to be table state awared, to handle different p2p messages. [DNM]fb/latency(cdc): agent to be table state awared, to handle different p2p messages. Jun 9, 2022
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 10, 2022
@3AceShowHand
Copy link
Contributor Author

/run-unit-test

@3AceShowHand
Copy link
Contributor Author

/run-all-tests

cdc/scheduler/internal/tp/table.go Show resolved Hide resolved
type table struct {
id model.TableID

status schedulepb.TableStatus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just schedulepb.TableState?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is also used to build heartbeatResponse, which needs checkpoint.

status is more useful in such use case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about query TableMeta() when building HeartbeatResponse? In this way, we don't need refresh to reconcile checkpoint and resolved ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we still need reconcile state. I don't think there is any difference.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 14, 2022
@3AceShowHand
Copy link
Contributor Author

@3AceShowHand 3AceShowHand merged commit 409594b into pingcap:fb/latency Jun 14, 2022
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 21, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 21, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 23, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 23, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
…p2p messages. (pingcap#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
ti-chi-bot pushed a commit that referenced this pull request Jun 24, 2022
…p2p messages. (#5820)

* add table struct to agent.

* agent add table state machine.

* simplify coordinator.

* agent to be state awared.

* call IsRemoveTableFinished to clean table resource from processor.

* fix message header.

* fix agent.

* prepare new agent ready.

* fix some test.

* add basic ut.

* fix agent handle message ut.

* add all test.

* fix agent handle stopping.

* adjust pipeline table state.

* refine the agent.

* introduce tableManager.

* fix all tests.

* add some new test.

* fix log.

* fix by make check

* fix by review comment.

* fix by review comment.

* fix ut.

* fix check.

* agent fix heartbeat does not refresh each tick.

* remove scheduler log.

* fix ut.

* fix some test.

* fix ut.

* rename

* fix by check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for reducing high latency
4 participants