Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ private DistributedQueryRunner(
{
requireNonNull(defaultSession, "defaultSession is null");

if (backupCoordinatorProperties.isPresent()) {
checkArgument(nodeCount >= 2, "the nodeCount must be greater than or equal to two!");
}

setupLogging();

try {
Expand All @@ -137,7 +133,9 @@ private DistributedQueryRunner(

registerNewWorker = () -> createServer(false, extraProperties, environment, additionalModule, baseDataDir, ImmutableList.of(), ImmutableList.of());

for (int i = backupCoordinatorProperties.isEmpty() ? 1 : 2; i < nodeCount; i++) {
int coordinatorCount = backupCoordinatorProperties.isEmpty() ? 1 : 2;
checkArgument(nodeCount >= coordinatorCount, "nodeCount includes coordinator(s) count, so must be at least %s, got: %s", coordinatorCount, nodeCount);
Comment thread
hashhar marked this conversation as resolved.
for (int i = coordinatorCount; i < nodeCount; i++) {
registerNewWorker.run();
}

Expand Down