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

RYOW Semantics do not work with Query and 2i GSI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Critical
    • 4.0.0
    • 4.0.0
    • clients, query, secondary-index
    • Security Level: Public
    • Untriaged
    • Unknown

    Description

      Todd Greenstein noted on MB-14429:

      Reran test per John's Request:
      [1] Fresh Install
      [2] Travel-Sample Dataset Loaded
      [3] All indexes created and verified online
      [4] Code Below, and Logs are attached.

      var couchbase = require('couchbase');
      var config = require('./../config');
      var Vq = couchbase.ViewQuery;
      var Nq = couchbase.N1qlQuery;
      var endPoint = config.couchbase.endPoint;
      var bucket = config.couchbase.bucket;
      var myCluster = new couchbase.Cluster(endPoint);
      var b = myCluster.openBucket(bucket);
      b.enableN1ql(config.couchbase.n1qlService)
      var q = Nq
      .fromString('SELECT * FROM `travel-sample` WHERE type=$1 AND id=$2')
      .consistency(Nq.Consistency.REQUEST_PLUS);
      b.query(q, ['cbTest', 0], function (err, rows) {
      if (err)
      { console.log('ERR:RYOW CHECK IF EXISTS:', err); }
      if(rows) {
      console.log('RYOW CHECK IF EXISTS:', rows);
      var newAirline =
      { id: 0, type: 'cbTest', name: 'Couchbase Airways', iata: 'CBX', icao: 'CBX', callsign: 'COUCH-BASE', country: 'United States' }
      ;
      b.upsert('airline_000', newAirline, function (err, res) {
      if (err)
      { console.log('ERR:RYOW INSERT', err); process.exit(2); }
      if (res) {
      b.query(q, ['cbTest', 0], function (err, newRows) {
      if (err)
      { console.log('ERR:RYOW POST UPSERT CHECK IF EXISTS:', err); }
      if (newRows)
      { console.log('RYOW POST UPSERT CHECK IF EXISTS:', rows); }
      });
      }
      });
      }
      });
      

      John noted on MB-14429:
      The first scan found 29465 rows and second found 29466 rows correctly

      Attachments

        Issue Links

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

          Activity

            People

              tgreenstein Todd Greenstein [X] (Inactive)
              siri Sriram Melkote (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty