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

Do not use cluster time in standalone mode

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Change the implementation of the insert command, especially

      db.coll.insertOne({a: Timestamp(0, 0)});
      

      so that we get the current time without changing the cluster time in Mongod standalone mode.

      When we run an insert with Timestamp(0, 0) we replace it with the current time. This happens in this code.

      auto nextTime = VectorClockMutable::get(opCtx)->tickClusterTime(1);
      

      As a result/ side effect, the cluster time component of the vector clock is updated to the current time. However, in standalone mongo the cluster time is expected to be Timestamp(0,1) (kInitialComponentTime), hence this creates incorrect state of the vector clock.

            Assignee:
            jess.balint@mongodb.com Jess Balint
            Reporter:
            milena.ivanova@mongodb.com Milena Ivanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None