Wire ExpressSingleDocumentLookupExecutor live behind featureFlagChangeStreamOptimizedUpdateLookup

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-06-22
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      First consumption of featureFlagChangeStreamOptimizedUpdateLookup (SERVER-117887). Wire the
      Express executor live for every replica-set / non-sharded change stream so local updateLookups
      bypass the heavyweight routed lookupSingleDocument. This is the first optimized path and the
      first new behaviour.

      Scope

      • Gate the executor factory in change_stream_add_post_image_stage_fn.cpp:
        • Flag off -> Aggregation-only chain (M1 behaviour, byte-for-byte master).
        • Flag on, replica set / non-sharded -> AlwaysLocal + Express, with the Aggregation fallback.
        • Flag on, sharded -> always-decline eligibility, so the lookup routes through the unchanged
          Aggregation fallback.
      • Enable Express uniformly across collection / db / cluster streams. Per-stream-type refinement
        (collection-level -> SBE) is deferred to M3.

      Files

      • src/mongo/db/exec/agg/change_stream_add_post_image_stage_fn.cpp

      Acceptance criteria

      • With the flag off, output is byte-for-byte master.
      • With the flag on, replica-set change_streams and change_streams_secondary_reads suites
        are green and the Express path is exercised; fullDocument is byte-identical to master.
      • Sharded deployments provably fall back (no behaviour change).

      Dependencies

      Depends on SERVER-117887 , SERVER-128410 (Aggregation-only rewire), SERVER-128413 (Express
      executor).

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

              Created:
              Updated:
              Resolved: