Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-532

Incr / Decr with TTL doesn't change TTL value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.4.4
    • None
    • None
    • Security Level: Public
    • None

    Description

      Ubuntu 12.04.5
      Python 2.7.3
      CB 3.0
      LCB Version= 2.4.3
      Python SDK - 2014-10-06 10:33:08.652762 _version_ = '1.2.4'

      Setting a new TTL value to a document during an increment or decrement call doesn't change the TTL value for the document. Am still testing this against other SDKs/LCB as well

      Have this is a try/except block to print any errors, no errors are printed.

      =========

      print "Setting foo now"

      c.set("foo", 18446744073709551615, ttl=300)

      try:
      data = c.get("foo")

      except CouchbaseError as e:
      print "Couldn't retrieve value for key", e

      1. Rethrow the exception, making the application exit
        raise

      ====

      print out the key_exptime

      then run

      ====

      print "Incrementing with TTL"

      try:
      c.incr("foo", amount=100, ttl=10)

      except CouchbaseError as e:
      print "Couldn't incr value for key", e

      1. Rethrow the exception, making the application exit
        raise

      =====

      The value is incremented as expected.
      print out key_exptime and it hasn't changed and doc still exists.

      Attachments

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

        Activity

          People

            ianmccloy Ian McCloy (Inactive)
            ianmccloy Ian McCloy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty