Handle NamespacePlacementChanged in DbAbsent state for FCV downgrade detection

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-04-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

        1. Handle NamespacePlacementChanged events with empty namespace in DbAbsent state

      This change enables the change stream shard targeter to handle `NamespacePlacementChanged` events with empty namespaces (which occur during FCV upgrades/downgrades) when in the DbAbsent state.

          1. Key Changes
      • *Event Handler Logic*: Added handling for `NamespacePlacementChangedControlEvent` in the DbAbsent state event handler. When placement history is unavailable, the system switches to v1 mode; otherwise, it continues processing.
      • *Control Event Filtering*: Updated the config server control event filter to include `NamespacePlacementChanged` events with empty namespaces alongside existing database creation events using an `$or` query.
      • *Event Type Registration*: Added `NamespacePlacementChangedControlEvent::opType` to the set of control event types processed on the config server.
      • *Validation*: Added assertions to ensure only cluster-level (empty namespace) `NamespacePlacementChanged` events are processed in DbAbsent state.
          1. Test Coverage
      • Added test cases verifying proper handling of `NamespacePlacementChanged` events with empty namespaces
      • Added validation that events with non-empty namespaces are rejected with appropriate error messages
      • Updated existing test expectations to include the new event type in control event filters
      • Added tests for both placement history available and unavailable scenarios

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

              Created:
              Updated:
              Resolved: