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

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

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • v6.0
    • Sharding EMEA 2022-04-04, Sharding EMEA 2022-04-18, Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16

      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

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

              Created:
              Updated:
              Resolved: