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

Overflow generated OpTimes from i field into t field

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • Fully Compatible
    • v3.4, v3.2
    • Repl 2017-02-13, Repl 2017-03-06, Repl 2017-03-27, Repl 2017-04-17

    Description

      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.)

      Attachments

        Activity

          People

            william.schultz@mongodb.com William Schultz (Inactive)
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: