code cleanup
This commit is contained in:
parent
e7cc9ca41a
commit
d9906d7d6a
|
@ -178,7 +178,7 @@ bool DatabaseConfiguration::isValid() const {
|
||||||
regions.size() <= 2 &&
|
regions.size() <= 2 &&
|
||||||
( usableRegions == 1 || regions.size() == 2 ) &&
|
( usableRegions == 1 || regions.size() == 2 ) &&
|
||||||
( regions.size() == 0 || regions[0].priority >= 0 ) &&
|
( 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -851,7 +851,7 @@ struct DDTeamCollection {
|
||||||
|
|
||||||
if(servers.size() >= self->configuration.storageTeamSize) {
|
if(servers.size() >= self->configuration.storageTeamSize) {
|
||||||
bool foundTeam = false;
|
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;
|
auto& serverTeams = self->server_info[servers[j]->id]->teams;
|
||||||
for( int k = 0; k < serverTeams.size(); k++ ) {
|
for( int k = 0; k < serverTeams.size(); k++ ) {
|
||||||
auto &testTeam = serverTeams[k]->getServerIDs();
|
auto &testTeam = serverTeams[k]->getServerIDs();
|
||||||
|
|
Loading…
Reference in New Issue