summaryrefslogtreecommitdiff
path: root/jstests/disk
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2023-03-20 19:51:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-20 21:08:21 +0000
commit7a00cd0798725c1d635885788cff9729936f6456 (patch)
tree781c852339c6d729da0242fa582cbc6627efdfbb /jstests/disk
parenta135d9aeaa678dd1e9facf1df7830554e752454d (diff)
downloadmongo-7a00cd0798725c1d635885788cff9729936f6456.tar.gz
SERVER-74901 Disable CSI
Diffstat (limited to 'jstests/disk')
-rw-r--r--jstests/disk/wt_validate_table_logging.js32
1 files changed, 21 insertions, 11 deletions
diff --git a/jstests/disk/wt_validate_table_logging.js b/jstests/disk/wt_validate_table_logging.js
index 571491a3be2..939280feeb8 100644
--- a/jstests/disk/wt_validate_table_logging.js
+++ b/jstests/disk/wt_validate_table_logging.js
@@ -8,15 +8,21 @@
(function() {
'use strict';
+load("jstests/libs/columnstore_util.js"); // For setUpServerForColumnStoreIndexTest.
+
let conn = MongoRunner.runMongod();
const dbpath = conn.dbpath;
const dbName = jsTestName();
const collName = 'coll';
+const csiEnabled = setUpServerForColumnStoreIndexTest(conn.getDB(dbName));
+
const create = function(conn) {
assert.commandWorked(conn.getDB(dbName).createCollection(collName));
- assert.commandWorked(conn.getDB(dbName)[collName].createIndex({'$**': "columnstore"}));
+ if (csiEnabled) {
+ assert.commandWorked(conn.getDB(dbName)[collName].createIndex({'$**': "columnstore"}));
+ }
};
const collUri = function(conn) {
@@ -55,14 +61,16 @@ const primary = replTest.getPrimary();
// Run validate as a replica set, which will expect the tables to not be logged.
let res = assert.commandWorked(primary.getDB(dbName).runCommand({validate: collName}));
assert(!res.valid);
-assert.eq(res.errors.length, 3);
+assert.eq(res.errors.length, csiEnabled ? 3 : 2);
checkLog.containsJson(primary, 6898101, {uri: collUri(primary), expected: false});
checkLog.containsJson(
primary, 6898101, {index: '_id_', uri: indexUri(primary, '_id_'), expected: false});
-checkLog.containsJson(
- primary,
- 6898101,
- {index: '$**_columnstore', uri: indexUri(primary, '$**_columnstore'), expected: false});
+if (csiEnabled) {
+ checkLog.containsJson(
+ primary,
+ 6898101,
+ {index: '$**_columnstore', uri: indexUri(primary, '$**_columnstore'), expected: false});
+}
// Create the collection and indexes as a replica set, which will cause the tables to not be logged.
assert.commandWorked(primary.getDB(dbName).runCommand({drop: collName}));
@@ -74,13 +82,15 @@ conn = MongoRunner.runMongod(nodeOptions);
// Run validate as a standalone, which will expect the tables to be logged.
res = assert.commandWorked(conn.getDB(dbName).runCommand({validate: collName}));
assert(!res.valid);
-assert.eq(res.errors.length, 3);
+assert.eq(res.errors.length, csiEnabled ? 3 : 2);
checkLog.containsJson(conn, 6898101, {uri: collUri(conn), expected: true});
checkLog.containsJson(conn, 6898101, {index: '_id_', uri: indexUri(conn, '_id_'), expected: true});
-checkLog.containsJson(
- conn,
- 6898101,
- {index: '$**_columnstore', uri: indexUri(conn, '$**_columnstore'), expected: true});
+if (csiEnabled) {
+ checkLog.containsJson(
+ conn,
+ 6898101,
+ {index: '$**_columnstore', uri: indexUri(conn, '$**_columnstore'), expected: true});
+}
MongoRunner.stopMongod(conn, null, {skipValidation: true});
}());