From d9906d7d6a66bbca3e51a9c2d5d74820a327ff9d Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Wed, 5 Sep 2018 13:42:10 -0700 Subject: [PATCH] code cleanup --- fdbclient/DatabaseConfiguration.cpp | 2 +- fdbserver/DataDistribution.actor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fdbclient/DatabaseConfiguration.cpp b/fdbclient/DatabaseConfiguration.cpp index e2ae0b5735..b47822630e 100644 --- a/fdbclient/DatabaseConfiguration.cpp +++ b/fdbclient/DatabaseConfiguration.cpp @@ -178,7 +178,7 @@ bool DatabaseConfiguration::isValid() const { regions.size() <= 2 && ( usableRegions == 1 || regions.size() == 2 ) && ( regions.size() == 0 || regions[0].priority >= 0 ) && - ( regions.size() == 0 || tLogPolicy->info() != "dcid^2 x zoneid^2 x 1") ) ) { + ( regions.size() == 0 || tLogPolicy->info() != "dcid^2 x zoneid^2 x 1") ) ) { //We cannot specify regions with three_datacenter replication return false; } diff --git a/fdbserver/DataDistribution.actor.cpp b/fdbserver/DataDistribution.actor.cpp index f6ec7d6bd9..b477472a52 100644 --- a/fdbserver/DataDistribution.actor.cpp +++ b/fdbserver/DataDistribution.actor.cpp @@ -851,7 +851,7 @@ struct DDTeamCollection { if(servers.size() >= self->configuration.storageTeamSize) { bool foundTeam = false; - for( int j = 0; j < std::max( 1, (int)(servers.size() - self->configuration.storageTeamSize + 1) ) && !foundTeam; j++ ) { + for( int j = 0; j < servers.size() - self->configuration.storageTeamSize + 1 && !foundTeam; j++ ) { auto& serverTeams = self->server_info[servers[j]->id]->teams; for( int k = 0; k < serverTeams.size(); k++ ) { auto &testTeam = serverTeams[k]->getServerIDs();