High verbosity log line in batch write path triggers invariant on bad top-level status

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The batch write path on mongos has this log line at level 4, that will log the batched command response from a shard if the dispatch was successful. This involves calling BatchedCommandResponse::toBSON, which uasserts the response's top-level status is OK. Any exception thrown by MongoD when running the batch write results in a command response with a top-level error, which fails this uassert on MongoS, early exiting the batch write path and then failingĀ this invariant in the BatchWriteOp destructor that all tracked writes have been cleared.

      Notably, any error in a batch write in a transaction is thrown by MongoD, which would trigger this.

              Assignee:
              [DO NOT USE] Backlog - Sharding Team
              Reporter:
              Jack Mulrow
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: