Details
-
Bug
-
Resolution: Cannot Reproduce
-
Critical
-
4.0.0
-
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