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

mcs, tso: change keyspace group primary path. #6526

Merged
merged 4 commits into from
May 29, 2023

Commits on May 29, 2023

  1. Change keyspace group primary path.

    Summary of "keyspace group primary path change".
    
    What:
    The path for non-default keyspace group primary election changes from  "/ms/{cluster_id}/tso/{group}/primary" to "/ms/{cluster_id}/tso/keyspace_groups/election/{group}/primary".
    Default keyspace group keeps /ms/{cluster_id}/tso/00000/primary.
    
    Why do we need this change?
    We need to add watch loop to every TSO server to watch the primaries of all keyspace groups.
    When #TSOServers > #GroupReplica, a TSO server only owns replicas of part of keyspace groups, i.e., the TSO server doesn't know the primaries of keyspace groups that the TSO server doesn't own.
    The partial keyspace group state view leads to slow TSO service discovery and inconsistent membership view.
    The above watch loop needs to watch the range [/ms/{cluster_id}/tso/00000/primary, /ms/{cluster_id}/tso/99999/primary],
    but it overlaps with keyspace groups' timestamp path /ms/{cluster_id}/tso/{group}/{gta|lta}/.../timestamp which results in huge inefficiency (as far as I know, there is no built-in filter based on suffix).
    
    Why do we keep the same path for Default keyspace group?
    It has been deployed to prod, and the change will cause incompatability issues. Leave the change and upgrade to the future.
    
    Signed-off-by: Bin Shi <[email protected]>
    binshi-bing committed May 29, 2023
    Configuration menu
    Copy the full SHA
    ca0aa63 View commit details
    Browse the repository at this point in the history
  2. Handle feedback

    Signed-off-by: Bin Shi <[email protected]>
    binshi-bing committed May 29, 2023
    Configuration menu
    Copy the full SHA
    af9bd00 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f5952ef View commit details
    Browse the repository at this point in the history
  4. handle feedback

    Signed-off-by: Bin Shi <[email protected]>
    binshi-bing committed May 29, 2023
    Configuration menu
    Copy the full SHA
    32cccd9 View commit details
    Browse the repository at this point in the history