Clearing collection metadata on a secondary when applying the `create` oplog entry during rs->shardedCluster promotion can result in a crash

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • 143
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      More specifically the following sequence of events cause the crash:

      1. A secondary is restarted with --shardsvr
      2. The secondary applies a create DDL command oplog entry for collection X
      3. Collection metadata for X is cleared 
      4. The secondary becomes primary and runs an insert on X
      5. The insert attempts to get the collection metadata for X, which was cleared, and so it attempts to throw a StaleConfig.
      6. Throwing StaleConfig causes the server to crash because there is no ShardId to create the StaleConfig error as the rs hasn't been added as a shard yet.

            Assignee:
            Unassigned
            Reporter:
            Wenqin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: