code cleanup

This commit is contained in:
Evan Tschannen 2018-09-05 13:42:10 -07:00
parent e7cc9ca41a
commit d9906d7d6a
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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();