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: [dnm] add TestFlowControlSendQueueRangeSplitMerge test (picked) #136495

Commits on Nov 27, 2024

  1. rac2,replica_rac2: add ForceFlushIndexChangedLocked to Processor, Ran…

    …geController
    
    This is used to set the highest index up to which all send-queues in
    pull mode must be force-flushed.
    
    Informs cockroachdb#135601
    
    Epic: CRDB-37515
    
    Release note: None
    sumeerbhola committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    a06a931 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2024

  1. kvserver: write ForceFlushIndex and integrate with RAC2

    - ReplicatedEvalResult.DoTimelyApplicationToAllReplicas is added and set
      in splitTriggerHelper, MergeTrigger, Migrate, Subsume.
    - The previous setting to true is gated on cluster version
      V25_1_AddRangeForceFlushKey.
    - This causes ReplicaState.ForceFlushIndex to be set, and
      RangeForceFlushKey (a replicated range-id local key) to be written when
      applying the corresponding batch to the state machine. The index is set
      to the index of the entry being applied, and is monotonically
      increasing.
    - replica_rac2.Processor and rac2.RangeController have
      existing ForceFlushIndexChangedLocked methods that are called whenever
      the Replica sees a change in the force-flush-index.
    
    Fixes cockroachdb#135601
    
    Epic: CRDB-37515
    
    Release note: None
    sumeerbhola committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    772624a View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2024

  1. kvserver: add TestFlowControlSendQueueRangeSplitMerge test

    Add a new rac2 flow control integration test,
    `TestFlowControlSendQueueRangeSplitMerge`.
    
    This test takes the following steps:
    
    ```sql
    -- We will exhaust the tokens across all streams while admission is blocked on
    -- n3, using a single 4 MiB (deduction, the write itself is small) write. Then,
    -- we will write a 1 MiB put to the range, split it, write a 1 MiB put to the
    -- RHS range, merge the ranges, and write a 1 MiB put to the merged range. We
    -- expect that at each stage where a send queue develops n1->s3, the send queue
    -- will be flushed by the range merge and range split range operations.
    ```
    
    Part of: cockroachdb#132614
    Release note: None
    kvoli committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    7dc2798 View commit details
    Browse the repository at this point in the history