Checking if destined recipient has changed for resharding creates another full copy of the updated document

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding 2020-11-30
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mutablebson::Document::getObject() renders a full copy of the updated document. This can be expensive for larger documents. At minimum we should skip calling it when the collection isn't even sharded like UpdateStage::checkUpdateChangesShardKeyFields() does. Better would be to consolidate some the _doc.getObject() calls that UpdateStage::checkUpdateChangesShardKeyFields(), UpdateStage::wasReshardingKeyUpdated(), and updates which weren't performed in-place all do.

              Assignee:
              Max Hirschhorn
              Reporter:
              Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: