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

Key with huge ttl gets deleted immediately after creation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Critical
    • 4.0.0
    • 3.0, 3.0.1, 3.0.2
    • couchbase-bucket
    • Security Level: Public
    • None
    • Untriaged
    • No

    Description

      Seeing this in 3.0 and 3.0.2.

      I did 'set' on a key with different ttls. I did getMeta() on the same key in a fraction of seconds immediately after the 'set'. This is what I observed:

      #ttl=300000
      memc_client.set('pymc1098', exp=300000, flags=0, val="dummy val")
      memc_client.getMeta('pymc1098') returns

      {'deleted': 0, 'seqno': 1, 'cas': 1417045652188427002, 'flags': 0, 'expiration': 1417345651}

      #ttl=3000000
      memc_client.set('pymc1098', exp=3000000, flags=0, val="dummy val")
      memc_client.getMeta('pymc1098') returns

      {'deleted': 1, 'seqno': 2, 'cas': 1417046333163110005, 'flags': 0, 'expiration': 1417046332}

      Pls note that deleted flag has been set and as a a result, Memcached returns "not found". Also seqno is 2 indicating the deletion.

      [root@centos-64-x64 bin]# ./cbstats localhost:11210 key pymc1098 0
      Memcached error #1: Not found

      #ttl=30000000
      memc_client.set('pymc1098', exp=30000000, flags=0, val="dummy val")
      memc_client.getMeta('pymc1098') returns

      {'deleted': 1, 'seqno': 2, 'cas': 1417046498600061006, 'flags': 0, 'expiration': 1417046497}

      Same as above, key gets deleted

      #ttl=300000000
      memc_client.set('pymc1098', exp=300000000, flags=0, val="dummy val")
      memc_client.getMeta('pymc1098') returns

      {'deleted': 1, 'seqno': 2, 'cas': 1417046045117933004, 'flags': 0, 'expiration': 1417046043}

      #ttl=3000000000
      memc_client.set('pymc1098', exp=3000000000, flags=0, val="dummy val")
      memc_client.getMeta('pymc1098') returns

      {'deleted': 0, 'seqno': 1, 'cas': 1417046941842247006, 'flags': 0, 'expiration': 3000000000}

      Pls see that last case is the expected behavior. And expiration is same as ttl.

      Given the nature of this bug, it should be a blocker but since this always existed, I'm raising this as a critical issue.

      Attachments

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

        Activity

          People

            chiyoung Chiyoung Seo (Inactive)
            apiravi Aruna Piravi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty