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 the spanconfig.SQLWatcher #71968

Merged
merged 1 commit into from
Nov 11, 2021

Commits on Nov 10, 2021

  1. spanconfig: introduce the spanconfig.SQLWatcher

    This patch introduces the SQLWatcher, which is intended to incrementally
    watch for updates to system.zones and system.descriptors. It does so by
    establishing rangefeeds at a given timestamp.
    
    The SQLWatcher invokes a callback from time to time  with a list of
    updates that have been observed in the window
    (previous checkpointTS, checkpointTS]. The checkpointTS is also
    provided to the callback.
    
    Internally, the SQLWatcher uses a buffer to keep track of events
    generated by the SQLWatcher's rangefeeds. It also tracks the individual
    frontier timestamps of both the rangefeeds. This helps to maintain the
    notion of the combined frontier timestamp, which is computed as the
    minimum of the two. This combined frontier timestamp serves as the
    checkpoint to the SQLWatcher's callback function.
    
    This interface isn't hooked up to anything yet. It'll be used by the
    sponconfig.Reconciler soon to perform partial reconciliation once
    full reconciliation is done. It is intended that the IDs from the
    updates produced by the SQLWatcher will be fed into the SQLTranslator.
    
    References cockroachdb#67679
    Carved from cockroachdb#69661
    
    Release note: None
    arulajmani committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    24465b8 View commit details
    Browse the repository at this point in the history