Comment field not propagated to shards in updateMany with pause-migrations flow

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2026-05-25, CAR Team 2026-06-08, CAR Team 2026-06-22, CAR Team 2026-07-06, CAR Team 2026-07-20, CAR Team 2026-08-03, CAR Team 2026-08-17, CAR Team 2026-08-31, CAR Team 2026-09-14
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When a client attaches a comment to an update or delete command that triggers the pause-migrations coordinator path (_shardsvrCoordinateMultiUpdate), the comment field is silently dropped and never reaches the shard that executes the write. This means the comment never appears in the shard's slow query log, breaking user expectations and making cross-cluster observability difficult.

      Root Cause

      In coordinate_multi_update_util.cpp:135-139, filterRequestGenericArguments() resets all generic arguments and only restores rawData:

      void filterRequestGenericArguments(GenericArguments& args) {
      auto rawData = args.getRawData();
      args = {};
      args.setRawData(rawData);
      }
      

      This is called from getRequestBson():74,79 before serializing the command into the command field of ShardsvrCoordinateMultiUpdate. The same stripping also happens in the bulkWrite path at line 120.

      The resulting BSON — without comment — is persisted in the coordinator document and used verbatim when MultiUpdateCoordinatorInstance::getUpdateAsClusterCommand() dispatches the write to the shard.

      The comment field is defined in generic_argument.idl with forward_to_shards: true, indicating the intent that it propagates to shards.

            Assignee:
            Sergi Mateo Bellido
            Reporter:
            Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: