-
Notifications
You must be signed in to change notification settings - Fork 724
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
tso/local: remove local tso completely #8864
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[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.
LGTM, but ci failed
@@ -217,17 +214,6 @@ func (am *AllocatorManager) getGroupIDStr() string { | |||
return strconv.FormatUint(uint64(am.kgID), 10) | |||
} | |||
|
|||
// GetTimestampPath returns the timestamp path in etcd. | |||
func (am *AllocatorManager) GetTimestampPath() string { |
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.
ditto
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.
GetTimestampPath
is only used to print log when created allocator manager
now. I think
log.Info("created allocator manager",
zap.Uint32("keyspace-group-id", group.ID))
is enough, do not have to know the TimestampPath.
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.
The comment is important and we also use it in the test.
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.
Did you say this comment?
// GetTimestampPath returns the timestamp path in etcd, which is:
// 1. for the default keyspace group:
// a. timestamp in /pd/{cluster_id}/timestamp
// b. lta/{dc-location}/timestamp in /pd/{cluster_id}/lta/{dc-location}/timestamp
// 1. for the non-default keyspace groups:
// a. {group}/gts/timestamp in /ms/{cluster_id}/tso/{group}/gta/timestamp
// b. {group}/lts/{dc-location}/timestamp in /ms/{cluster_id}/tso/{group}/lta/{dc-location}/timestamp
GetTimestampPath() string
It is outdated. lta/{dc-location}/timestamp in /pd/{cluster_id}/lta/{dc-location}/timestamp
and {group}/lts/{dc-location}/timestamp in /ms/{cluster_id}/tso/{group}/lta/{dc-location}/timestamp
are removed. We can see the left in
pd/pkg/utils/keypath/key_path.go
Lines 356 to 366 in 3cfd66f
// KeyspaceGroupGlobalTSPath constructs the timestampOracle path prefix for Global TSO, which is: | |
// 1. for the default keyspace group: | |
// "" in /pd/{cluster_id}/timestamp | |
// 2. for the non-default keyspace groups: | |
// {group}/gta in /ms/{cluster_id}/tso/{group}/gta/timestamp | |
func KeyspaceGroupGlobalTSPath(groupID uint32) string { | |
if groupID == constant.DefaultKeyspaceGroupID { | |
return "" | |
} | |
return path.Join(fmt.Sprintf("%05d", groupID), globalTSOAllocatorEtcdPrefix) | |
} |
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.
Got it. BTW, I found we still have some comments mentioning KeyspaceGroupLocalTSPath
, please also remove it.
Signed-off-by: okJiang <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8864 +/- ##
==========================================
- Coverage 76.14% 76.12% -0.03%
==========================================
Files 458 458
Lines 70208 70160 -48
==========================================
- Hits 53462 53408 -54
- Misses 13389 13393 +4
- Partials 3357 3359 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: okJiang <[email protected]>
/retest |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rleungx The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: Close #8802
What is changed and how does it work?
Check List
Tests
Release note