From 932c71f2eb95b2cd23137bfd4e0052663a954b19 Mon Sep 17 00:00:00 2001 From: Ruchitha Rajaghatta <77162985+ruchitharajaghatta@users.noreply.github.com> Date: Fri, 1 May 2026 07:35:37 -0400 Subject: [PATCH] SERVER-120732: replSetInitiate should error (#52594) GitOrigin-RevId: 90adabfb0d2df7d1b6b5ea3d1da64205855abecd --- .../resmokelib/testing/fixtures/replicaset.py | 11 +++++++++-- jstests/libs/replsettest.js | 9 ++++----- .../query/oplog_scan_optimizations_do_not_conflict.js | 3 ++- .../server_status_change_stream_metrics.js | 3 ++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py index a8e0a2ec0cb..3c23eba407a 100644 --- a/buildscripts/resmokelib/testing/fixtures/replicaset.py +++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py @@ -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: diff --git a/jstests/libs/replsettest.js b/jstests/libs/replsettest.js index 4779585297b..8a97343aa16 100644 --- a/jstests/libs/replsettest.js +++ b/jstests/libs/replsettest.js @@ -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 diff --git a/jstests/noPassthrough/query/oplog_scan_optimizations_do_not_conflict.js b/jstests/noPassthrough/query/oplog_scan_optimizations_do_not_conflict.js index 566d5dd3196..a7dfd323af3 100644 --- a/jstests/noPassthrough/query/oplog_scan_optimizations_do_not_conflict.js +++ b/jstests/noPassthrough/query/oplog_scan_optimizations_do_not_conflict.js @@ -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"); diff --git a/jstests/noPassthrough/query/server_status/server_status_change_stream_metrics.js b/jstests/noPassthrough/query/server_status/server_status_change_stream_metrics.js index ebfd51e453a..abdfe170737 100644 --- a/jstests/noPassthrough/query/server_status/server_status_change_stream_metrics.js +++ b/jstests/noPassthrough/query/server_status/server_status_change_stream_metrics.js @@ -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());