Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90584

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

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

      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 Unassigned
            Reporter:
            wenqin.ye@mongodb.com Wenqin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: