more simulation fixes
This commit is contained in:
parent
38a5511b96
commit
96eec756b3
|
@ -955,9 +955,13 @@ ACTOR Future<CoordinatorsResult::Type> changeQuorum( Database cx, Reference<IQuo
|
|||
|
||||
if(g_network->isSimulated()) {
|
||||
for(int i = 0; i < (desiredCoordinators.size()/2)+1; i++) {
|
||||
auto address = NetworkAddress(desiredCoordinators[i].ip,desiredCoordinators[i].port,true,desiredCoordinators[i].isTLS());
|
||||
g_simulator.protectedAddresses.insert(address);
|
||||
TraceEvent("ProtectCoordinator").detail("Address", address).backtrace();
|
||||
auto addresses = g_simulator.getProcessByAddress(desiredCoordinators[i])->addresses;
|
||||
|
||||
g_simulator.protectedAddresses.insert(addresses.address);
|
||||
if(addresses.secondaryAddress.present()) {
|
||||
g_simulator.protectedAddresses.insert(addresses.secondaryAddress.get());
|
||||
}
|
||||
TraceEvent("ProtectCoordinator").detail("Address", desiredCoordinators[i]).backtrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1207,7 +1207,7 @@ void setupSimulatedSystem(vector<Future<Void>>* systemActors, std::string baseFo
|
|||
g_simulator.protectedAddresses.insert(
|
||||
NetworkAddress(coordinatorAddresses[i].ip, coordinatorAddresses[i].port, true, coordinatorAddresses[i].isTLS()));
|
||||
if(coordinatorAddresses[i].port==2) {
|
||||
g_simulator.protectedAddresses.insert(NetworkAddress(coordinatorAddresses[i].ip, 1, true, false));
|
||||
g_simulator.protectedAddresses.insert(NetworkAddress(coordinatorAddresses[i].ip, 1, true, true));
|
||||
}
|
||||
}
|
||||
deterministicRandom()->randomShuffle(coordinatorAddresses);
|
||||
|
|
Loading…
Reference in New Issue