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

kvserver/rangefeed: remove future package for server rangefeed #125782

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Oct 25, 2024

  1. kvserver/rangefeed: process unregister requests asyncronously

    After the output loop completes, 2 cleanup steps are performed:
    
    1) The registration is removed from the processors registry
    2) The process is potentially stopped and removed from the replica.
    
    Before this change, both of these happened syncronously after the
    output loop finished.
    
    With this change, step (1) happens asyncronously. To facilitate this,
    an overflow mechanism is provided. This overflow mechanism potentially
    allocates. Note that we expect that the number of requests is
    relatively small and should be O(rangefeeds_on_range) so hopefully
    this mechanism won't be used often.
    
    Step (2) is now handled by the processor itself. After processing an
    unregister request, if the set of registrations falls to zero, we
    enqueue a Stop event for ourselves. Then, when processing the Stop, we
    unregister ourselves from the replica.
    
    Note that this may look like a small semantics change since the
    previous unregister callback called Stop() which processes all events.
    However, note that a Stopped event is processed after all other
    events, so any events in the queue at the point of processing the
    unregistration that enqueued the stop will be processed.
    
    The motivation for this change is to eventually allow cleanup step (1)
    to be run as part of registration.disconnect(), which needs to be
    non-blocking. This is desired for a future change in which there is
    not a dedicated goroutine to perform this cleanup.
    
    Epic: none
    Release note: None
    stevendanna authored and wenyihu6 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    508af05 View commit details
    Browse the repository at this point in the history
  2. kvserver/rangefeed: scan all registrations overflow

    Rather than a dynamic overflow queue, we now set a flag indicating
    that an overflow happened and then scan all registrations in the case
    of overflow.
    
    Release note: None
    Epic: none
    stevendanna authored and wenyihu6 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    3ee2acc View commit details
    Browse the repository at this point in the history
  3. kvserver/rangefeed: run unregister as part of disconnect

    For the ScheduledProcess, we now enqueue the unregister as part of the
    first disconnect call.
    
    Epic: none
    Release note: None
    stevendanna authored and wenyihu6 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    a2cff13 View commit details
    Browse the repository at this point in the history
  4. kvserver/rangefeed: remove context

    stevendanna authored and wenyihu6 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    4552a3c View commit details
    Browse the repository at this point in the history