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

*: enable span configs by default #73876

Merged
merged 7 commits into from
Jan 18, 2022

Commits on Jan 17, 2022

  1. spanconfig: deduplicate missing IDs in reconciler

    This helper was intended to create a set of missing IDs, but it didn't.
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    757fde3 View commit details
    Browse the repository at this point in the history
  2. migration: migrate into span configs infrastructure

    We need a version gate before switching over to the span configs
    infrastructure by default (cockroachdb#73876, future commit). In a mixed-version
    cluster we need to wait for the host tenant to have fully populated
    system.span_configurations (read: reconciled) at least once before it's
    safe to using it as a view for all split/config decisions.
    
        clusterversion.EnsureSpanConfigReconciliation
    
    We also want to ensure that the view over all configs maintained
    per-store is at least as up-to-date as some full reconciliation
    timestamp.
    
        clusterversion.EnsureSpanConfigSubscription
    
    Without a version gate, it would be possible for a replica on a
    new-binary-server to apply static fallback configs (assuming no entries
    in `system.span_configurations`), in violation of explicit configs
    directly set by the user. Though unlikely, it's also possible for us to
    merge all ranges into a single one (with no entries in
    system.span_configurations, the infrastructure can erroneously conclude
    that there are zero split points).
    
    To get past all this, we author a three-step migration, two with
    attached migrations for each of the steps above (in order), and a final
    cluster version gate.
    
        clusterversion.EnableSpanConfigStore
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    93c92fa View commit details
    Browse the repository at this point in the history
  3. sql: enable span configs for logic tests

    We replace the 'enable-span-configs` cluster option with its opposite
    without actually using it anywhere. In a future commit we'll flip
    the (opt-in) EnableSpanConfigs flag with an opt-out variant, using this
    new cluster option to power it. Update the relevant logictest files
    while here.
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    77adcaf View commit details
    Browse the repository at this point in the history
  4. *: enable span configs by default

    We were previously using opt-in flags to enable span configs; this
    commit flips it into opt-out ones (DisableSpanConfigs and
    COCKROACH_DISABLE_SPAN_CONFIGS). This has the following effects:
    a. fresh crdb nodes/clusters run with span configs enabled.
    b. our entire test suite runs using the span configs infrastructure, save
       for a select few written:
       (i)  with the gossipped system config span in mind;
       (ii) using legacy testing harnesses that prevent injection of
            spanconfig dependencies due to circular imports.
    
    We also introduce a more minified form of the opt-out testing flag:
    UseSystemConfigSpanForQueues. Using the minified form still enables the
    SQL-side of span configs to run (Reconciler, SQLWatcher, SQLTranslator)
    but defaults to using the system config span down in KV.
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    610aa04 View commit details
    Browse the repository at this point in the history
  5. localtestcluster: use span configs infra for tests

    Few (old) packages use localtestcluster package for tests, a package
    that previously opted out of using the span configs infrastructure due
    to circular dependency reasons. With \cockroachdb#74865 this is no longer
    necessary.
    
      $ dev test pkg/kv/kvclient/kvcoord pkg/kv/kvserver/idalloc
      [...]
      //pkg/kv/kvclient/kvcoord:kvcoord_test            PASSED in 54.7s
      //pkg/kv/kvserver/idalloc:idalloc_test            PASSED in 2.0s
    
      INFO: Build completed successfully, 10 total actions
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    6bfe7e0 View commit details
    Browse the repository at this point in the history
  6. spanconfig: add testing knob to configure scratch range

    A few tests rely on RANGE DEFAULT's configuration to also apply to the
    scratch range keyspace, an out-of-the box behavior for the system config
    span. This PR introduces an opt-in testing knob to do the same.
    
    Release note: None
    irfansharif committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    3f383fd View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. server,status: disable reconciliation job for few stat tests

    It's unclear why these tests experience a massive slowdown.
    Investigating it is tracked as part of cockroachdb#74919.
    
    Release note: None
    irfansharif committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    4f6fc15 View commit details
    Browse the repository at this point in the history