-
Notifications
You must be signed in to change notification settings - Fork 727
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
dr-ausosync: report min resolved ts #4716
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. |
Codecov Report
@@ Coverage Diff @@
## master #4716 +/- ##
==========================================
- Coverage 75.09% 75.00% -0.10%
==========================================
Files 284 287 +3
Lines 28022 28123 +101
==========================================
+ Hits 21043 21093 +50
- Misses 5113 5151 +38
- Partials 1866 1879 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
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.
this resloved ts is cluster-level, do we need the data center-level? such as, Primary DC scope resolved ts and DR DC scop resolved ts. cc @disksing
core.SetMinResolvedTS(minResolvedTS), | ||
) | ||
|
||
return c.putStoreLocked(newStore) |
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.
I think this has unnecessary writes to etcd.
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.
cc @disksing
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.
It should be ok to write to etcd. If not write to etcd, it will be lost when PD is shut down or PD leader is changed.
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.
it only write meta information to etcd, actually there is no any update :
func (c *RaftCluster) putStoreLocked(store *core.StoreInfo) error {
if c.storage != nil {
if err := c.storage.SaveStore(store.GetMeta()); err != nil {
return err
}
}
c.core.PutStore(store)
c.hotStat.GetOrCreateRollingStoreStats(store.GetID())
return nil
}
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
It should be cluster scope. |
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.
- Could or should we store the
min_resolve_ts
once we receive the request instead store it in goroutine? - the path
min_resolved_ts
is too big, maybe save it to a sub path?
|
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
core.SetMinResolvedTS(minResolvedTS), | ||
) | ||
|
||
return c.putStoreLocked(newStore) |
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.
it only write meta information to etcd, actually there is no any update :
func (c *RaftCluster) putStoreLocked(store *core.StoreInfo) error {
if c.storage != nil {
if err := c.storage.SaveStore(store.GetMeta()); err != nil {
return err
}
}
c.core.PutStore(store)
c.hotStat.GetOrCreateRollingStoreStats(store.GetID())
return nil
}
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests 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. |
This pull request has been accepted and is ready to merge. Commit hash: 5d6c960
|
@lhy1024: 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. |
ref tikv#4686 Signed-off-by: lhy1024 <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]>
Signed-off-by: lhy1024 [email protected]
What problem does this PR solve?
Issue Number: ref #4686
Check List
Tests
Release note