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

VectorClock's topology time may be wrongly advanced in case of rollback

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • v6.0
    • Sharding EMEA 2022-04-04, Sharding EMEA 2022-04-18, Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16

    Description

      The CSRS is registering a topology time tick point (timestamp X)when observing local inserts and applyOps modifying config.shards. On majority commit, if the timestamp of the majority committed oplog entry is greater or equal than X, the topology time is then advanced to X.

      The current implementation does not take into account rollbacks and may end up bumping wrongly the topology time. Example:

      • A shard entry is added to config.shards at time T
      • A tick point is registered with timestamp T
      • Rollback happens, oplog gets truncated to the operation registered at T-2
      • A new CSRS primary steps up, the shard is added at time T-1 and then any write happens at time T
      • On majority commit, the old primary ticks the topology time to T instead of T-1

      Attachments

        Activity

          People

            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: