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

META().expiration gives wrong results for non-covered index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Spock.Next, 5.5.0
    • 5.0.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      META().expiration uses covered index it gives right results. When used non covered index it gives 0.

      This needs to be documented for Spock may not be addressable in Spock due to following reasons.

      1) N1QL fetches data from memecached using GET. The GET call is not includes expiration, seqno, etc...
      2) To get this information we need to do GET_META call.
      3) Making additional call for each key for SELECT/UPDATE... etc can cause latency can be doubled and through put drops drastically. Also the data between two calls can be out of sync.

      The possible solution is defined new protocol and pass as bit flags that what information needed as single call.

      Repro :
      -----------

      brew install libcouchbase
      cbc create foo -V "{\"test\":\"bar\"}"  -U couchbase://127.0.0.1/default   -e 1000000 -u Administrator -P password
      

      create index ixdi on default(meta().expiration);
      select meta().id, meta().expiration from default where meta().expiration is not null;
      --- covered index. above select gives one row.
      select meta().id, meta().expiration, xxx from default where meta().expiration is not null;
      --- non covered index, no rows given
      
      

      See MB-15950 and it comments more details.

      Attachments

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

        Activity

          People

            isha Isha Kandaswamy (Inactive)
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty