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

Split brain and term change handling for shards authoritative CRUD path

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2025-03-17
    • 2

      Split brain part:
      In authoritative shards, the router cannot have a more up-to-date DB version than the primary. In the rare case of the replica set suffering a split brain, a node might think it is a primary but doesn't really have the quorum for it. In that case, DDLs could have advanced the database version, and routers could have gone further ahead. It is rare, but we need to handle that case for the primary CRUD path as well.

      Term change handling:
      For authoritative shards, a secondary will wait for oplog replication to catch up with the timestamp in the DB version. We need to think carefully of any replication state changes that could happen during that time and how to deal with them:

      • The secondary itself might go through an election - and either become the primary, or stay the secondary.
      • Other nodes might go through an election and a term change might happen

      Other than the waiting secondary itself becoming a primary, intuitively it feels any other transition should be okay - let's think more in this ticket and commit any changes.

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: