From 14689df2c9025183c9700efcf7e479e247b29d82 Mon Sep 17 00:00:00 2001 From: Irina Yatsenko Date: Mon, 26 Sep 2022 15:59:20 +0000 Subject: SERVER-69549 Unify tags used in columnstore index tests --- jstests/core/columnstore_eligibility.js | 2 +- jstests/core/columnstore_index.js | 2 +- jstests/core/columnstore_index_correctness.js | 2 +- jstests/core/columnstore_index_per_path_filters.js | 2 +- .../columnstore_large_array_index_correctness.js | 3 +-- jstests/core/columnstore_validindex.js | 3 ++- jstests/core/hidden_index.js | 1 - jstests/core/projection_semantics.js | 4 +--- jstests/noPassthrough/column_scan_slow_logs.js | 20 ++++++++------------ jstests/noPassthrough/column_store_index_load.js | 5 +++-- .../noPassthrough/columnstore_index_persistence.js | 19 ++++++++----------- .../restart_index_build_if_resume_fails.js | 6 ++++-- ..._index_build_if_resume_interrupted_by_shutdown.js | 1 + .../resumable_index_build_bulk_load_phase.js | 3 ++- .../resumable_index_build_bulk_load_phase_large.js | 4 +++- ..._index_build_clearing_tmp_directory_on_restart.js | 3 ++- .../resumable_index_build_collection_scan_phase.js | 3 ++- ...umable_index_build_collection_scan_phase_large.js | 5 ++++- .../resumable_index_build_initialized.js | 3 ++- .../resumable_index_build_mixed_phases.js | 3 ++- .../noPassthroughWithMongod/column_scan_explain.js | 15 ++++++++------- 21 files changed, 57 insertions(+), 52 deletions(-) diff --git a/jstests/core/columnstore_eligibility.js b/jstests/core/columnstore_eligibility.js index 2a7bd772104..34d66620197 100644 --- a/jstests/core/columnstore_eligibility.js +++ b/jstests/core/columnstore_eligibility.js @@ -6,7 +6,7 @@ * does_not_support_stepdowns, * # Cannot run aggregate with explain in a transaction. * does_not_support_transactions, - * requires_fcv_62, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, diff --git a/jstests/core/columnstore_index.js b/jstests/core/columnstore_index.js index b79a4e928c9..d6638721c6c 100644 --- a/jstests/core/columnstore_index.js +++ b/jstests/core/columnstore_index.js @@ -3,7 +3,7 @@ * @tags: [ * # Uses $indexStats which is not supported inside a transaction. * does_not_support_transactions, - * requires_fcv_62, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, diff --git a/jstests/core/columnstore_index_correctness.js b/jstests/core/columnstore_index_correctness.js index 9d300661e69..5457eb6f8ea 100644 --- a/jstests/core/columnstore_index_correctness.js +++ b/jstests/core/columnstore_index_correctness.js @@ -1,9 +1,9 @@ /** * Testing of just the query layer's integration for columnar index. * @tags: [ - * requires_fcv_62, * # Runs explain on an aggregate command which is only compatible with readConcern local. * assumes_read_concern_unchanged, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, diff --git a/jstests/core/columnstore_index_per_path_filters.js b/jstests/core/columnstore_index_per_path_filters.js index b37a70186b3..bc55728c3a3 100644 --- a/jstests/core/columnstore_index_per_path_filters.js +++ b/jstests/core/columnstore_index_per_path_filters.js @@ -3,9 +3,9 @@ * might be pushed down into the column scan stage. * * @tags: [ - * requires_fcv_62, * # Runs explain on an aggregate command which is only compatible with readConcern local. * assumes_read_concern_unchanged, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, diff --git a/jstests/core/columnstore_large_array_index_correctness.js b/jstests/core/columnstore_large_array_index_correctness.js index dd4e2b78204..a46a8c33196 100644 --- a/jstests/core/columnstore_large_array_index_correctness.js +++ b/jstests/core/columnstore_large_array_index_correctness.js @@ -1,8 +1,7 @@ /** * Testing of just the query layer's integration for columnar indexes that encode large arrays. * @tags: [ - * # columnstore indexes are new in 6.1. - * requires_fcv_61, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, diff --git a/jstests/core/columnstore_validindex.js b/jstests/core/columnstore_validindex.js index 9c9ca8ce23b..9c3771b4b77 100644 --- a/jstests/core/columnstore_validindex.js +++ b/jstests/core/columnstore_validindex.js @@ -3,9 +3,10 @@ * @tags: [ * # Uses index building in background. * requires_background_index, - * requires_fcv_62, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, + * featureFlagSbeFull, * # TODO SERVER-69884: featureFlag guarded tests shouldn't require explicit 'no_selinux' tag. * no_selinux, * ] diff --git a/jstests/core/hidden_index.js b/jstests/core/hidden_index.js index 959310ba6c1..931c27a5df5 100644 --- a/jstests/core/hidden_index.js +++ b/jstests/core/hidden_index.js @@ -6,7 +6,6 @@ * # CollMod is not retryable. * requires_non_retryable_commands, * uses_column_store_index, - * requires_fcv_62, * ] */ diff --git a/jstests/core/projection_semantics.js b/jstests/core/projection_semantics.js index 0ce019885b5..83d171a45d8 100644 --- a/jstests/core/projection_semantics.js +++ b/jstests/core/projection_semantics.js @@ -5,12 +5,10 @@ * TODO SERVER-63947 these tags shouldn't be necessary if we remove the explicit columnstore index * mention. * @tags: [ - * # columnstore indexes are new in 6.1. - * requires_fcv_61, + * uses_column_store_index, * # We could potentially need to resume an index build in the event of a stepdown, which is not * # yet implemented. * does_not_support_stepdowns, - * uses_column_store_index, * ] */ (function() { diff --git a/jstests/noPassthrough/column_scan_slow_logs.js b/jstests/noPassthrough/column_scan_slow_logs.js index 465f51cdec3..4bede8a0ec9 100644 --- a/jstests/noPassthrough/column_scan_slow_logs.js +++ b/jstests/noPassthrough/column_scan_slow_logs.js @@ -1,27 +1,23 @@ /** * Tests to ensure that COLUMN_SCAN plan and scanned columns appear in slow query log lines when * the columstore index is the winning plan. + * @tags: [ + * # column store indexes are still under a feature flag and require full sbe + * uses_column_store_index, + * featureFlagColumnstoreIndexes, + * featureFlagSbeFull, + * # TODO SERVER-69884: featureFlag guarded tests shouldn't require explicit 'no_selinux' tag. + * no_selinux, + * ] */ (function() { "use strict"; -load("jstests/libs/sbe_util.js"); // For 'checkSBEEnabled()'. - const conn = MongoRunner.runMongod({}); assert.neq(null, conn, "mongod was unable to start up"); const db = conn.getDB(jsTestName()); - -const columnstoreEnabled = - checkSBEEnabled(db, ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"]); -if (!columnstoreEnabled) { - jsTestLog("Skipping columnstore index validation test since the feature flag is not enabled."); - MongoRunner.stopMongod(conn); - return; -} - assert.commandWorked(db.dropDatabase()); - const coll = db.collection; // Set logLevel to 1 so that all queries will be logged. diff --git a/jstests/noPassthrough/column_store_index_load.js b/jstests/noPassthrough/column_store_index_load.js index ef111db4f3c..314043bbb4d 100644 --- a/jstests/noPassthrough/column_store_index_load.js +++ b/jstests/noPassthrough/column_store_index_load.js @@ -4,14 +4,15 @@ * Indexes are validated by comparing query results that use the index with results from a control * query that uses a collection scan. * @tags: [ - * # columnstore indexes are new in 6.1. - * requires_fcv_61, * # We could potentially need to resume an index build in the event of a stepdown, which is not * # yet implemented. * does_not_support_stepdowns, + * # column store indexes are still under a feature flag and require full sbe * uses_column_store_index, * featureFlagColumnstoreIndexes, * featureFlagSbeFull, + * # TODO SERVER-69884: featureFlag guarded tests shouldn't require explicit 'no_selinux' tag. + * no_selinux, * ] */ (function() { diff --git a/jstests/noPassthrough/columnstore_index_persistence.js b/jstests/noPassthrough/columnstore_index_persistence.js index b6ad24cb908..3b33476aa6d 100644 --- a/jstests/noPassthrough/columnstore_index_persistence.js +++ b/jstests/noPassthrough/columnstore_index_persistence.js @@ -2,8 +2,14 @@ * Tests that a columnstore index can be persisted and found in listIndexes after a server restart. * * @tags: [ - * requires_persistence, - * requires_replication, + * requires_persistence, + * requires_replication, + * # column store indexes are still under a feature flag and require full sbe + * uses_column_store_index, + * featureFlagColumnstoreIndexes, + * featureFlagSbeFull, + * # TODO SERVER-69884: featureFlag guarded tests shouldn't require explicit 'no_selinux' tag. + * no_selinux, * ] */ @@ -17,15 +23,6 @@ rst.startSet(); rst.initiate(); let primary = rst.getPrimary(); -const columnstoreIndexesEnabled = - assert.commandWorked(primary.adminCommand({getParameter: 1, featureFlagColumnstoreIndexes: 1})) - .featureFlagColumnstoreIndexes.value; - -if (!columnstoreIndexesEnabled) { - jsTestLog('Skipping test because the columnstore index feature flag is disabled'); - rst.stopSet(); - return; -} const collName = 'columnstore_index_persistence'; let db_primary = primary.getDB('test'); diff --git a/jstests/noPassthrough/restart_index_build_if_resume_fails.js b/jstests/noPassthrough/restart_index_build_if_resume_fails.js index 365afd1e640..e166465d2c6 100644 --- a/jstests/noPassthrough/restart_index_build_if_resume_fails.js +++ b/jstests/noPassthrough/restart_index_build_if_resume_fails.js @@ -6,6 +6,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -23,8 +24,9 @@ rst.initiate(); let primary = rst.getPrimary(); let coll = primary.getDB(dbName).getCollection(collName); -const columnstoreEnabled = checkSBEEnabled( - primary.getDB(dbName), ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"], true); +const columnstoreEnabled = checkSBEEnabled(primary.getDB(dbName), + ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"], + true /* checkAllNodes */); assert.commandWorked(coll.insert({a: 1})); diff --git a/jstests/noPassthrough/restart_index_build_if_resume_interrupted_by_shutdown.js b/jstests/noPassthrough/restart_index_build_if_resume_interrupted_by_shutdown.js index 70b91ac5ccd..a33f279e9a4 100644 --- a/jstests/noPassthrough/restart_index_build_if_resume_interrupted_by_shutdown.js +++ b/jstests/noPassthrough/restart_index_build_if_resume_interrupted_by_shutdown.js @@ -7,6 +7,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { diff --git a/jstests/noPassthrough/resumable_index_build_bulk_load_phase.js b/jstests/noPassthrough/resumable_index_build_bulk_load_phase.js index 2d8b948e7e7..e46dec3c06b 100644 --- a/jstests/noPassthrough/resumable_index_build_bulk_load_phase.js +++ b/jstests/noPassthrough/resumable_index_build_bulk_load_phase.js @@ -6,6 +6,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -67,4 +68,4 @@ if (columnstoreEnabled) { } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_bulk_load_phase_large.js b/jstests/noPassthrough/resumable_index_build_bulk_load_phase_large.js index 905596b21d9..c4d7ed46502 100644 --- a/jstests/noPassthrough/resumable_index_build_bulk_load_phase_large.js +++ b/jstests/noPassthrough/resumable_index_build_bulk_load_phase_large.js @@ -7,6 +7,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -24,6 +25,7 @@ rst.initiate(); const columnstoreEnabled = checkSBEEnabled( rst.getPrimary().getDB(dbName), ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"], true); + // Insert enough data so that the collection scan spills to disk. const coll = rst.getPrimary().getDB(dbName).getCollection(jsTestName()); const bulk = coll.initializeUnorderedBulkOp(); @@ -55,4 +57,4 @@ if (columnstoreEnabled) { [{skippedPhaseLogID: 20391}]); } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_clearing_tmp_directory_on_restart.js b/jstests/noPassthrough/resumable_index_build_clearing_tmp_directory_on_restart.js index 71f6bdf3e08..2b028416558 100644 --- a/jstests/noPassthrough/resumable_index_build_clearing_tmp_directory_on_restart.js +++ b/jstests/noPassthrough/resumable_index_build_clearing_tmp_directory_on_restart.js @@ -6,6 +6,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -62,4 +63,4 @@ const files = listFiles(tmpDir); assert.eq(files.length, 0, files); rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_collection_scan_phase.js b/jstests/noPassthrough/resumable_index_build_collection_scan_phase.js index 4a797816fbb..bd3d1920447 100644 --- a/jstests/noPassthrough/resumable_index_build_collection_scan_phase.js +++ b/jstests/noPassthrough/resumable_index_build_collection_scan_phase.js @@ -7,6 +7,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -63,4 +64,4 @@ if (columnstoreEnabled) { } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_collection_scan_phase_large.js b/jstests/noPassthrough/resumable_index_build_collection_scan_phase_large.js index cc82cd05203..8ca6ca1ced2 100644 --- a/jstests/noPassthrough/resumable_index_build_collection_scan_phase_large.js +++ b/jstests/noPassthrough/resumable_index_build_collection_scan_phase_large.js @@ -7,6 +7,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -30,8 +31,10 @@ rst.initiate(); // Insert enough data so that the collection scan spills to disk. const primary = rst.getPrimary(); const coll = primary.getDB(dbName).getCollection(jsTestName()); + const columnstoreEnabled = checkSBEEnabled( primary.getDB(dbName), ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"], true); + const bulk = coll.initializeUnorderedBulkOp(); for (let i = 0; i < numDocuments; i++) { // Each document is at least 1 MB. @@ -67,4 +70,4 @@ if (columnstoreEnabled) { [{numScannedAfterResume: numDocuments - maxIndexBuildMemoryUsageMB}]); } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_initialized.js b/jstests/noPassthrough/resumable_index_build_initialized.js index a8fe831ac86..ecd9001632c 100644 --- a/jstests/noPassthrough/resumable_index_build_initialized.js +++ b/jstests/noPassthrough/resumable_index_build_initialized.js @@ -7,6 +7,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -53,4 +54,4 @@ if (columnstoreEnabled) { } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthrough/resumable_index_build_mixed_phases.js b/jstests/noPassthrough/resumable_index_build_mixed_phases.js index 21e64da1346..b62da7449e6 100644 --- a/jstests/noPassthrough/resumable_index_build_mixed_phases.js +++ b/jstests/noPassthrough/resumable_index_build_mixed_phases.js @@ -6,6 +6,7 @@ * requires_majority_read_concern, * requires_persistence, * requires_replication, + * uses_column_store_index, * ] */ (function() { @@ -159,4 +160,4 @@ if (columnstoreEnabled) { [{numScannedAfterResume: 2}, {skippedPhaseLogID: 20391}]); } rst.stopSet(); -})(); \ No newline at end of file +})(); diff --git a/jstests/noPassthroughWithMongod/column_scan_explain.js b/jstests/noPassthroughWithMongod/column_scan_explain.js index 1f2a60e8253..e08df3fe9b2 100644 --- a/jstests/noPassthroughWithMongod/column_scan_explain.js +++ b/jstests/noPassthroughWithMongod/column_scan_explain.js @@ -1,5 +1,13 @@ /** * Tests the explain support for the COLUMN_SCAN stage. + * @tags: [ + * # column store indexes are still under a feature flag and require full sbe + * uses_column_store_index, + * featureFlagColumnstoreIndexes, + * featureFlagSbeFull, + * # TODO SERVER-69884: featureFlag guarded tests shouldn't require explicit 'no_selinux' tag. + * no_selinux, + * ] */ (function() { "use strict"; @@ -9,13 +17,6 @@ load("jstests/libs/analyze_plan.js"); // For planHasStage. load("jstests/libs/sbe_util.js"); // For checkSBEEnabled. load("jstests/libs/sbe_explain_helpers.js"); // For getSbePlanStages. -const columnstoreEnabled = - checkSBEEnabled(db, ["featureFlagColumnstoreIndexes", "featureFlagSbeFull"]); -if (!columnstoreEnabled) { - jsTestLog("Skipping columnstore index validation test since the feature flag is not enabled."); - return; -} - const coll = db.column_scan_explain; coll.drop(); -- cgit v1.2.1