Skip to content

Commit 611c9b8

Browse files
authored
Skip prevoting if single-node discovery (#91255)
Fixes #89867
1 parent cfc981a commit 611c9b8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,6 +1628,10 @@ public void run() {
16281628
}
16291629

16301630
if (prevotingRound != null) {
1631+
if (singleNodeDiscovery) {
1632+
logger.debug("skip prevoting as single-node discovery is enabled");
1633+
return;
1634+
}
16311635
prevotingRound.close();
16321636
}
16331637
prevotingRound = preVoteCollector.start(lastAcceptedState, getDiscoveredNodes());

test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected static int defaultInt(Setting<Integer> setting) {
208208
return setting.get(Settings.EMPTY);
209209
}
210210

211-
// Updating the cluster state involves up to 7 delays:
211+
// Updating the cluster state involves up to the following number of delays:
212212
// 1. submit the task to the master service
213213
// 2. state publisher task on master
214214
// 3. master sends out PublishRequests to nodes

0 commit comments

Comments
 (0)