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

N1QL Limit pushdown sometimes causing Query to return less results when using TTL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 6.0.3, 6.5.0
    • query, secondary-index
    • Untriaged
    • Unknown

    Description

      Request

      Make indexer aware of expiring documents

      Problem

      When using an index for the query (for the population), and later a fetch, you might get 0 results, even thought there is a documents which supposed to be returned. that because they have been TTLed and the index was not notified about it.

      Query:

       

      Select name, data_field
      from myBucket
      where type = "test"
      limit 10

       

       

      create index ix_1 on test(name)
      

      Put a random TTL on documents -> results, even thought you requested 10 documents, sometimes you wouldn't get 10 but less.

      +Backgroun+d

      Currently KV supports TTL - but doesn't report it as a mutation (also to the Indexer) up until the expiry pager was run or the document has been accessed.

      Attachments

        Issue Links

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

          Activity

            People

              kamini.jagtiani Kamini Jagtiani
              roi.katz Roi Katz
              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