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

Overflow generated OpTimes from i field into t field

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • v3.4, v3.2
    • Repl 2017-02-13, Repl 2017-03-06, Repl 2017-03-27, Repl 2017-04-17

      Currently, if the i field of the global OpTime on a server increments past signed int max, we abort the process:

           if (val.getInc() & 0x80000000) {
                  mongo::warning() << "clock skew detected  prev: " << val.getSecs()
                                   << " now: " << (unsigned) time(0) << std::endl;
                  return true;
              }
      

      Instead, we could handle this by incrementing the "secs" field by one and resetting the "inc" field back to 1. (The code resets the inc field back to 1 instead of 0 in the normal case, for some reason.)

            Assignee:
            william.schultz@mongodb.com Will Schultz
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: