SERVER-120732: replSetInitiate should error (#52594)

GitOrigin-RevId: 90adabfb0d2df7d1b6b5ea3d1da64205855abecd
This commit is contained in:
Ruchitha Rajaghatta 2026-05-01 07:35:37 -04:00 committed by MongoDB Bot
parent 53723f7fc0
commit 932c71f2eb
4 changed files with 17 additions and 9 deletions

View File

@ -356,8 +356,15 @@ class ReplicaSetFixture(interface.ReplFixture, interface._DockerComposeInterface
# to apply the requested repl_config settings using reconfig.
self._reconfig_repl_set(client, repl_config)
else:
self.logger.info("Issuing replSetInitiate command: %s", repl_config)
self._initiate_repl_set(client, repl_config)
disagg_enabled = (
self.nodes[0]
.get_mongod_options()
.get("set_parameters", {})
.get("disaggregatedStorageEnabled", False)
)
if not disagg_enabled:
self.logger.info("Issuing replSetInitiate command: %s", repl_config)
self._initiate_repl_set(client, repl_config)
self._await_primary()
if self.fcv is not None:

View File

@ -1812,12 +1812,11 @@ export class ReplSetTest {
}
/**
* Runs replSetInitiate on the first node of the replica set.
*
* TODO (SERVER-109841): Replsetinitiate is currently a no-op command for disagg. Determine the
* next steps for this function if additional functionality is to be incorporated.
* Blocks until the set is initialized with a primary.
* TODO SERVER-124472: Determine if initiateForDisagg needs additional functionality to
* match ASC ReplSetTest.initiate.
*/
initiateForDisagg(cfg, initCmd) {
initiateForDisagg() {
const startTime = new Date(); // Measure the execution time of this function.
// Blocks until there is a primary. We use a faster retry interval here since we expect the

View File

@ -13,7 +13,8 @@ rst.initiate();
// Background query analysis operations such as index creation may throw off
// the checks between the replSetGetStatus result and the last oplog entry.
// TODO SERVER-109841: This should be deleted if we move this into ReplSetTest.
// TODO SERVER-124430: This should be deleted if we move this into
// ReplSetTest initiateForDisagg.
rst.waitForQueryAnalysisWriterSetup();
const db = rst.getPrimary().getDB("oplog_scan_optimizations");

View File

@ -23,7 +23,8 @@ rst.initiate();
// Background query analysis operations such as index creation may throw off
// the checks between the replSetGetStatus result and the last oplog entry.
// TODO SERVER-109841: This should be deleted if we move this into ReplSetTest.
// TODO SERVER-124430: This should be deleted if we move this into
// ReplSetTest initiateForDisagg.
rst.waitForQueryAnalysisWriterSetup();
const db = rst.getPrimary().getDB(jsTest.name());