ExportXMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator

      Original Downstream Change Summary

      Downstream Changes Summary

      Project context
      ---------------
      With featureFlagChangeStreamOptimizedUpdateLookup on, collection-level change streams resolve
      updateLookup fullDocuments on the SBE executor: it compiles a parameterized {_id: <value>} plan
      once and reuses it across events, with the collection acquisition cached across the batch window.
      SBE may decline a lookup (unsupported _id shape, collation, ...); declines fall through to the
      routed Aggregation executor (see SERVER-129513).

      What this ticket adds
      ---------------------
      New serverStatus metric names under metrics.changeStreams.updateLookup.sbe, populated from the
      SBE executor, completing the per-engine set (express, sbe, aggregation). Reading the three cells
      together shows how lookups distribute across engines and whether engine changes shift work to
      the fallback.

      Metric semantics
      ----------------
      Same outcome model as the other engines: found / notFound / notHandled (decline, not an error) -
      latencyMicros (histogram, microseconds), recorded only for executed lookups.
      Scope note: SBE latency covers the WHOLE eligibility run - including any stale-config routing
      refresh and retry - not just the terminal index attempt, because that is what the caller
      actually waited for.

      No new commands, options, response fields, or wire-protocol changes; no change to lookup results.

      Description of Linked Ticket

      Context

      SBE is the intended primary local executor for collection-level update-lookup streams (flag on). SBE
      support has not landed yet and is contingent on the SBE feasibility go/no-go, so this ticket is
      future — blocked until the SBE executor and the collection-level factory switch exist. The
      fall-through SBE can trigger (kNotHandled -> Aggregation) is verified separately in the sharded
      fall-through ticket.

      Scope

      • Add the updateLookupSbeStats accessor (registers the cell — not in the infrastructure ticket).
      • Add the recorder constructor parameter and the record* calls in SbeSingleDocumentLookupExecutor.performLookup.
      • The collection-level updateLookup factory injects the updateLookupSbeStats cell.
      • planBuilds-per-cursor stays a feasibility-branch diagnostic — do NOT ship a serverStatus metric.
      • Pre-image-on-SBE is a separate path; its addPreImage recorder wiring is the pre-image telemetry ticket, not this one.

      Acceptance

      A collection-level stream with updates increments changeStreams.updateLookup.sbe.found / notFound + latency.

      Tests

      Extend the shared metrics jstest with the (flag on, collection) branch: when the flag is on and
      changeStreamPassthroughType() is kCollection, expect the sbe cell. No new file.

      Dependencies

      Depends on the metrics infrastructure ticket, the SBE executor and the collection-level factory switch
      (not yet built), and the Aggregation wiring ticket (shares the jstest). Future — blocked until SBE
      lands, contingent on the SBE feasibility go/no-go.

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: