Batch/Bulk write size estimation logic on mongos doesn't account for sampleId fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • 3
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I think the size estimate is calculated here. And that eventually calls BatchItemRef::getSizeForBatchWriteBytes and write_ops::getUpdateSizeEstimate. But the writeOp we use for size calculation is the writeOp from the user request, which shouldn't have the sampleId field. In our implementation, we only attach the sampleId field after we target an operation and before we send to a shard/mongod. So that means that when getUpdateSizeEstimate is called, this would always return boost::none.

      This ticket should fix both batchWrite and bulkWrite.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: