-
Notifications
You must be signed in to change notification settings - Fork 726
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
Implement the merging operation of Keyspace Group #6589
Comments
What if the primary of a keyspace group, which has already stopped the service and responded the PD leader, transferred to another server before 4.a. Without persistent info, will the new primary of the keyspace group still serve the requests before 4.a? |
To solve the above problem, can we have the following steps?
After synced offline with @JmPotato , we'll go with this improvement. |
We already have step 2 implemented. We also have part of 3 implemented and the other part has the similar logic and code. |
ref #6589 Implement the keyspace group merging API. Signed-off-by: JmPotato <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ref #6589 Prohibit merging the default keyspace group. Signed-off-by: JmPotato <[email protected]>
ref #6589 Implement the keyspace group merge checker. Signed-off-by: JmPotato <[email protected]>
ref #6589 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
) close #6589 - Implement `deletedGroupCleaner` to clean up the legacy TSO key. - Extract the timestamp key path constructor. Signed-off-by: JmPotato <[email protected]>
ref #6589 Since it's possible that a keyspace group is to be deleted and merged before its TSO is initialized, we should allow `mergedTS` to be zero in `mergingChecker`. This PR allows this case and only block the merging when loading the TSO meets the error. Signed-off-by: JmPotato <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ref tikv#6589 Implement the keyspace group merging API. Signed-off-by: JmPotato <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ref tikv#6589 Prohibit merging the default keyspace group. Signed-off-by: JmPotato <[email protected]>
ref tikv#6589 Implement the keyspace group merge checker. Signed-off-by: JmPotato <[email protected]>
ref tikv#6589 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
…kv#6745) close tikv#6589 - Implement `deletedGroupCleaner` to clean up the legacy TSO key. - Extract the timestamp key path constructor. Signed-off-by: JmPotato <[email protected]>
ref tikv#6589 Since it's possible that a keyspace group is to be deleted and merged before its TSO is initialized, we should allow `mergedTS` to be zero in `mergingChecker`. This PR allows this case and only block the merging when loading the TSO meets the error. Signed-off-by: JmPotato <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ref tikv#6589 Implement the keyspace group merge checker. Signed-off-by: JmPotato <[email protected]>
ref tikv#6589 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
…kv#6745) close tikv#6589 - Implement `deletedGroupCleaner` to clean up the legacy TSO key. - Extract the timestamp key path constructor. Signed-off-by: JmPotato <[email protected]>
ref #6589 Add log to show the progress of group cleaning up. Signed-off-by: JmPotato <[email protected]>
Development Task
As we now support the split operation of Keyspace Group, it is also necessary to provide reverse merge operations, which can help us better manage the number of Keyspace Groups and do some rollback operations.
To implement the merging operation of Keyspace Group, it may contain the following process:
a. Once the groups that need to be merged watch this change, it will stop serving any TSO request to the outside.
b. Once the merging target groups watch this change, it will start the merging process described as follows.
a. Stop serving any TSO request to the outside if it has not been performed step 1.a yet.
b. Return the current TSO as the gRPC response.
a. Set its current TSO to the biggest one among all the primary responses.
b. Ask the PD leader to delete these groups from the meta and move the keyspaces.
The text was updated successfully, but these errors were encountered: