Convert change-stream notification o2 fields to IDL types

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      change_stream_oplog_notification.cpp has 7 notify* functions emitting 8 distinct events

      • shardCollection,
      • movePrimary,
      • reshardCollection,
      • namespacePlacementChanged,
      • migrateLastChunkFromShard,
      • migrateChunkToNewShard,
      • moveChunk,
      • refineCollectionShardKe

      whose o2 payloads are still built with raw BSONObjBuilder / BSON(...).
      Three sibling reshard events already use IDL structs from resharding_change_event_o2_field.idl.

      Migrate the remaining payloads to IDL types (reusing KeyPattern where applicable) so all notifications follow the same pattern; output BSON must remain byte-equivalent to keep v1/v2 readers happy.

      Open question:

      • extend the existing IDL file, rename it (e.g. change_stream_event_o2_field.idl) and move it next to the writer in src/mongo/db/repl/, or
      • create a new sibling file for the non-resharding events.

            Assignee:
            Unassigned
            Reporter:
            Sebastien Mendez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: