Refactor ChangeStreamUpdateLookupStage onto the BatchedEnrichmentStage primitive

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      Rebase the change-stream updateLookup stage onto the BatchedEnrichmentStage
      primitive. Production runs a batch size of 1, so behaviour is unchanged – this
      lands the batching machinery and its validation, not a behaviour change. Larger
      production batches are turned on later, for collection-level streams, when the
      caching (SBE) executor that makes batching pay is introduced.

      Scope

      • Reparent ChangeStreamUpdateLookupStage onto BatchedEnrichmentStage; enrich
        becomes the existing per-update-event post-image lookup (a minimal diff).
      • Open/close a ScopedBatchedLookup per batch (a no-op on the per-call Express path).
      • Add internal setParameters for the batch-size limits and pass them through the
        stage factory. The factory sets the production batch size to 1.

      Validation

      • Output byte-identical to the non-batched path; existing change_streams and
        passthrough suites green with the flag on and off.
      • With the batch size forced above 1 via setParameter: a resume jstest that kills
        and resumes at forced batch-cut points with a non-empty buffer; a latency jstest
        confirming an idle stream still emits per event.

      Depends on

      SERVER-129168 (the primitive) and SERVER-128414 (the Express wiring).

            Assignee:
            Denis Grebennicov
            Reporter:
            Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: