diff options
author | Josef Ahmad <josef.ahmad@mongodb.com> | 2023-05-03 15:51:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-03 17:15:38 +0000 |
commit | 793343a30bc55a30457a9a45c4b189c1af5f0d7f (patch) | |
tree | 16c450d206dd64cbfa9c44b4348bfdfe439758a6 /src/mongo/db/commands | |
parent | b69056c43c1debe589cb9bb9f578afdee7f8f963 (diff) | |
download | mongo-793343a30bc55a30457a9a45c4b189c1af5f0d7f.tar.gz |
SERVER-75644 Abort an index build locally if the build state hasn't yet replicated
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r-- | src/mongo/db/commands/create_indexes_test.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/commands/create_indexes_test.cpp b/src/mongo/db/commands/create_indexes_test.cpp index 3932a957485..c252d040c02 100644 --- a/src/mongo/db/commands/create_indexes_test.cpp +++ b/src/mongo/db/commands/create_indexes_test.cpp @@ -37,13 +37,6 @@ namespace { class CreateIndexesTest : public CatalogTestFixture {}; -// TODO (SERVER-75644) re-enable this test case. This test case exercises a failure that occurs -// during the setup phase of the index build, before it replicates the startIndexBuild oplog entry. -// With SERVER-75644 the index build should abort by itself, that is, without using the -// voteAbortIndexBuild signal. This should allow us to run this test without having to add -// replication subsystem support for voting. - -#if 0 TEST_F(CreateIndexesTest, CreateIndexesFailsWhenIndexBuildsCollectionIsMissing) { auto opCtx = operationContext(); // Drop config.system.indexBuilds collection. @@ -76,12 +69,14 @@ TEST_F(CreateIndexesTest, CreateIndexesFailsWhenIndexBuildsCollectionIsMissing) "createIndexes" << nss.coll() << "indexes" << BSON_ARRAY(index) << "commitQuorum" << 0); BSONObj result; // This should fail since config.system.indexBuilds does not exist. + startCapturingLogMessages(); ASSERT_FALSE(client.runCommand(nss.dbName(), createIndexesCmdObj, result)) << result; + stopCapturingLogMessages(); + ASSERT_EQ(1, countBSONFormatLogLinesIsSubset(BSON("id" << 7564400))); ASSERT(result.hasField("code")); ASSERT_EQ(result.getIntField("code"), 6325700); } } -#endif } // namespace } // namespace mongo |