-
Notifications
You must be signed in to change notification settings - Fork 287
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
api,owner(ticdc): return error when api fails #4494
api,owner(ticdc): return error when api fails #4494
Conversation
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
[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. |
Signed-off-by: Neil Shen <overvenus@gmail.com>
0388065
to
fb216eb
Compare
Signed-off-by: Neil Shen <overvenus@gmail.com>
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.
Will this change break other systems that have cdc cli integrated?(I'm not sure if there are any such customers) Go from asynchronous to synchronous.
if isOwner { | ||
res.owner = &owner.Owner{} | ||
} | ||
res.owner = o |
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.
What is the effect if nil is passed in here?
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.
No effect, owner
is an interface, default value is nil.
type Owner struct { | ||
// Owner managers TiCDC cluster. | ||
// | ||
// The interface is thread-safe, except for Tick, it's only used by etcd worker. |
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.
There is no Tick in this interface.
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.
Tick
is in orchestrator.Reactor
.
Signed-off-by: Neil Shen <overvenus@gmail.com>
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #4494 +/- ##
================================================
- Coverage 55.6402% 55.4596% -0.1806%
================================================
Files 494 499 +5
Lines 61283 61744 +461
================================================
+ Hits 34098 34243 +145
- Misses 23750 24053 +303
- Partials 3435 3448 +13 |
/run-kafka-integration-test |
It is possible, though I think the impact is neglectable, as owner APIs are fast. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 51e2418
|
/run-kafka-integration-test /tidb=pr/32081 |
1 similar comment
/run-kafka-integration-test /tidb=pr/32081 |
What problem does this PR solve?
Issue Number: close #1710 ref #3456
What is changed and how it works?
API waits and returns owner response.
Check List
Tests
Side effects
Release note