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

Expired items are not excluded from production/dev views until expiry pager runs ( which deletes the items from database permanently )


    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Security Level: Public
    • Environment:


      Expired items are not excluded from production/dev views. This happens only after the item is "get".

      Steps to reproduce:

      1. Create default bucket and create 1 production view
      curl -X PUT -H 'Content-Type: application/json' 'http://Administrator:asdasd@' -d '{"views":{"v1":{"map":"function(doc,meta)




      2. Insert 2 items from memcached client with expiry set to 5 seconds

      >>> import mc_bin_client
      >>> mc = mc_bin_client.MemcachedClient(port=12001)
      >>> mc.set("ab", 5, 0, "val")
      (3306888435, 7973028514358, '')
      >>> mc.set("ab1", 5, 0, "val")
      (2896330942, 7997559610975, '')

      3. Query the view with stale=false to build the index
      curl -X GET ''





      4. Query the view after couple of minutes and expired items are still returned
      curl -X GET ''





      If memcached get is used with these items, then these are excluded from the views. Otherwise these are always returned in view results.

      Diagnostic is attached.

      Checked with Mike on this and ep-engine seems to be doing things correctly:

      "This does look like an issue, but not in the ep-engine side. Since ep-engine might take an hour to actually remove an expired item, it should be up to the view engine to filter out any expired items too. The reaon why doing a get will cause the item to disappear from the view results is that ep-engine will actually do the deletion."

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


        There are no open Gerrit changes for this issue.


          • Assignee:
            mccouch MC Brown (Inactive)
            deepkaran.salooja Deepkaran Salooja
          • Votes:
            0 Vote for this issue
            3 Start watching this issue


            • Created:

              Gerrit Reviews

              There are no open Gerrit changes