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

spanconfig: visualize differences with gossiped SystemConfigSpan #73746

Merged
merged 2 commits into from
Dec 16, 2021

Commits on Dec 15, 2021

  1. spanconfig: visualize differences with gossiped SystemConfigSpan

    We introduce a test-only package that compares the span configs
    infrastructure against the gossiped SystemConfigSpan it was designed to
    replace. The datadriven test spits out a visual "diff" of the two
    subsystems, indicating exactly where they differ (or not!) in terms of
    implied range boundaries and the configurations to apply. It does so by
    having both systems run side-by-side and scanning their contents. These
    range boundaries and configurations have second-order effects (various
    actions are executed on behalf of ranges by internal queues), but we
    don't bother with any of that in the test.
    
    Of particular note is the behavior of each system in the presence of
    secondary tenants that create arbitrary schemas and zone configs. This
    after all is what motivated the new infrastructure. Here's an example,
    as a diff, that shows how the system config span is unable to split
    within an active tenant's boundary unlike the new thing:
    
        configs version=current offset=37 limit=5
        ----
        ...
        /Tenant/10                                 range default
        /Tenant/11/Table/3                         range default
        /Tenant/11/Table/4                         range default
        /Tenant/11/Table/5                         range default
        /Tenant/11/Table/6                         range default
        ...
    
        configs version=legacy offset=43
        ----
        ...
        /Tenant/10                                 range default
        /Tenant/11                                 range default
    
        diff offset=31 limit=8
        ----
        --- gossiped system config span (legacy)
        +++ span config infrastructure (current)
        ...
        @@ -43,4 +37,37 @@
         /Table/47                                  range system
         /Tenant/10                                 range default
        -/Tenant/11                                 range default
        +/Tenant/11/Table/3                         range default
        +/Tenant/11/Table/4                         range default
        +/Tenant/11/Table/5                         range default
        +/Tenant/11/Table/6                         range default
        ...
    
    This commit also gets rid of the ShadowReader. We were using it
    previously to manually diagnose differences between the two subsystems.
    With the improved testing, we can get rid of the painter's tape.
    
    Release note: None
    irfansharif committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    044cc3f View commit details
    Browse the repository at this point in the history
  2. spanconfig: rm benign differences with SystemConfigSpan

    In the previous commit we demonstrated visually the differences between
    the gossip-backed system config span and the new infrastructure. This
    commit gets rid of the benign differences. We could also just not do
    anything here, but it's only a minor change.
    
    Release note: None
    irfansharif committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    f6bc6fd View commit details
    Browse the repository at this point in the history