Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-21617

Change CAS timestamp granularity to nanoseconds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.0
    • 4.6.0
    • couchbase-bucket
    • Untriaged
    • Unknown

    Description

      Prior to 4.6 CAS value were generated using the high resolution (nanosecond) timer – which is not in all cases guaranteed to be a wall clock time. Moving to the standard C++ wall clock API moves us to a microsecond timer and since we use the bottom 16 bits of the timestamp value for the counter, the effective granularity of the time portion of a CAS timestamp is about 65 milliseconds. This is pretty coarse and a similar order to what is achievable via NTP time sync and thus ends up effectively increases the uncertainty in any given timestamp.

      We should return to our previous behavior of using a value in nanoseconds. On platforms on which wall clock values are returned in microseconds scaling them to nanoseconds introduces no greater resolution, however, on many platforms wall clocks support nanosecond granularity.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            dfinlay Dave Finlay
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty