Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1472

TTL incorrectly set when value in milliseconds is above ~24 days

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.4.8
    • 2.4.7
    • library
    • None
    • CB Server Version: 4.6.1-3652 Enterprise Edition (build-3652)
      .NET SDK 2.4.7 on Windows 10 with Visual Studio 2015

    Description

      The TTL on a document is being incorrectly set during an upsert if the value passed in milliseconds is greater than ~24 days.

      Steps to replicate:

      1.  Create a timespan object of 24 days (TimeSpan duration = new TimeSpan(24, 0, 0, 0))

      2.  Upsert a document via the .NET SDK with an Expiry set to the millisecond equivalent of the above TimeSpan (document.Expiry = (uint)timeToLive.Value.TotalMilliseconds)

      3. Check the TTL of the document, which is a valid unix timestamp (1503681410 in my case)

      4. Run the same test with a timespan object of 25 days (TimeSpan duration = new TimeSpan(25, 0, 0, 0))

      5. Upsert again

      6. Check the TTL of the document, which is a unix timestamp WAY in the future (4292832329 in my case)

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            jack.harper Jack Harper
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty