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: introduce spanconfig.StoreWriter (and its impl) #70287

Merged
merged 1 commit into from
Oct 2, 2021

Commits on Oct 1, 2021

  1. spanconfig: introduce spanconfig.StoreWriter (and its impl)

    In cockroachdb#69172 we introduced a spanconfig.StoreReader interface to abstract
    away the gossiped system config span. We motivated that PR by teasing
    a future implementation of the same interface, an in-memory data
    structure to maintain a mapping between between spans and configs
    (powered through a view over system.span_configurations introduced in
    \cockroachdb#69047). This PR introduces just that.
    
    Intended (future) usages:
    - cockroachdb#69614 introduces the KVWatcher interface, listening in on
      system.span_configurations. The updates generated by it will be used
      to populate per-store instantiations of this data structure, with an
      eye towards providing a "drop-in" replacement of the gossiped system
      config span (conveniently implementing the sibling
      spanconfig.StoreReader interface).
    - cockroachdb#69661 introduces the SQLWatcher interface, listening in on changes to
      system.{descriptor,zones} and generating denormalized span config
      updates for every descriptor/zone config change. These updates will
      need to be diffed against a spanconfig.StoreWriter populated with the
      existing contents of KVAccessor to generate the "targeted" diffs
      KVAccessor expects.
    
    Release note: None
    irfansharif committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    62f1237 View commit details
    Browse the repository at this point in the history