Relax invariant in ReshardingOpObserver about temporary resharding collection being sharded

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding 2021-03-22
    • 153
    • 1
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It is technically possible for a user to manually create a "system.resharding." collection that isn't sharded. The invariants in ReshardingOpObserver::onInserts() and ReshardingOpObserver::onUpdate() should be changed to a uassert(ErrorCodes::NamespaceNotSharded, ..., metadata && metadata->isSharded()) to avoid crashing the server in such a situation.

              Assignee:
              Yuhong Zhang
              Reporter:
              Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: