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

Rebuild SrvVSchema during InitTablet. #6276

Merged
merged 1 commit into from
Jun 6, 2020

Commits on Jun 5, 2020

  1. Rebuild SrvVSchema during InitTablet.

    We used to rebuild SrvVSchema in all cells as part of running
    GetOrCreateShard from any cell. That caused VSchema problems to spread
    instantly to all cells at once, so we changed EnsureVSchema to only
    rebuild SrvVSchema in the local cell.
    
    We believed that at least one tablet in a given cell would still end up
    rebuilding SrvVschema in the cell since they all call GetOrCreateShard
    at startup. However, I didn't realize that GetOrCreateShard
    short-circuits if the shard already exists, so it was skipping
    EnsureVSchema entirely.
    
    This moves the rebuild of SrvVSchema to be an explicit step in
    InitTablet alongside the rebuild of the keyspace graph. This keeps
    GetOrCreateShard as a task that only needs to be done by one tablet
    globally because it affects global topo. The rebuilding of per-cell
    records should be done by a tablet in that cell.
    
    Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
    enisoc committed Jun 5, 2020
    Configuration menu
    Copy the full SHA
    ba4a04b View commit details
    Browse the repository at this point in the history