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

Touch with expiry time 0 does not work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-2
    • Fix Version/s: 2.0
    • Component/s: couchbase-bucket
    • Security Level: Public
    • Labels:
      None
    • Environment:
      Couchbase server 2.0 build 1971

      Description

      According to the specification touch 0 should set the expiry time to never expire, but for couchbase buckets it cause the document to expire immediately (memcached buckets does the right thing here).

      Easy test is:
      telnet localhost 11211
      add a 1 30 1
      a
      touch a 0
      get a

      On a couchbase bucket you won't get anything back from the last get, whereas on memcached buckets you'll get the document a.

      The bug is caused by the following code in ep_engine.cc (in EventuallyPersistentEngine::touch):

      exptime = serverApi->core->abstime(serverApi->core->realtime(exptime));

      Instead the code should be:

      if (exptime != 0)

      { exptime = serverApi->core->abstime(serverApi->core->realtime(exptime)); }
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        There are no open Gerrit changes for this issue.

          People

          • Assignee:
            chiyoung Chiyoung Seo
            Reporter:
            trond Trond Norbye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes