Do not use cluster time in standalone mode

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • 3
    • 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:
            Unassigned
            Reporter:
            Milena Ivanova
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: