Make ccInterface a const reference in workerServer
This commit is contained in:
parent
829277f848
commit
ceb83f7f5e
|
@ -4858,18 +4858,18 @@ ACTOR Future<Void> clusterControllerCore(ClusterControllerFullInterface interf,
|
|||
++self.getWorkersRequests;
|
||||
vector<WorkerDetails> workers;
|
||||
|
||||
for (auto& it : self.id_worker) {
|
||||
for (auto const& [id, worker] : self.id_worker) {
|
||||
if ((req.flags & GetWorkersRequest::NON_EXCLUDED_PROCESSES_ONLY) &&
|
||||
self.db.config.isExcludedServer(it.second.details.interf.addresses())) {
|
||||
self.db.config.isExcludedServer(worker.details.interf.addresses())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((req.flags & GetWorkersRequest::TESTER_CLASS_ONLY) &&
|
||||
it.second.details.processClass.classType() != ProcessClass::TesterClass) {
|
||||
worker.details.processClass.classType() != ProcessClass::TesterClass) {
|
||||
continue;
|
||||
}
|
||||
|
||||
workers.push_back(it.second.details);
|
||||
workers.push_back(worker.details);
|
||||
}
|
||||
|
||||
req.reply.send(workers);
|
||||
|
|
|
@ -925,7 +925,7 @@ ACTOR Future<Void> storageServer(
|
|||
connFile); // changes pssi->id() to be the recovered ID); // changes pssi->id() to be the recovered ID
|
||||
ACTOR Future<Void> masterServer(MasterInterface mi,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>>> ccInterface,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>> const> ccInterface,
|
||||
ServerCoordinators serverCoordinators,
|
||||
LifetimeToken lifetime,
|
||||
bool forceRecovery);
|
||||
|
|
|
@ -1981,7 +1981,7 @@ ACTOR Future<Void> masterCore(Reference<MasterData> self) {
|
|||
|
||||
ACTOR Future<Void> masterServer(MasterInterface mi,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>>> ccInterface,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>> const> ccInterface,
|
||||
ServerCoordinators coordinators,
|
||||
LifetimeToken lifetime,
|
||||
bool forceRecovery) {
|
||||
|
|
|
@ -604,7 +604,7 @@ ACTOR Future<Void> registrationClient(Reference<AsyncVar<Optional<ClusterControl
|
|||
}
|
||||
|
||||
// Returns true if `address` is used in the db (indicated by `dbInfo`) transaction system and in the db's primary DC.
|
||||
bool addressInDbAndPrimaryDc(const NetworkAddress& address, Reference<AsyncVar<ServerDBInfo>> dbInfo) {
|
||||
bool addressInDbAndPrimaryDc(const NetworkAddress& address, Reference<AsyncVar<ServerDBInfo> const> dbInfo) {
|
||||
const auto& dbi = dbInfo->get();
|
||||
|
||||
if (dbi.master.addresses().contains(address)) {
|
||||
|
@ -661,7 +661,7 @@ bool addressInDbAndPrimaryDc(const NetworkAddress& address, Reference<AsyncVar<S
|
|||
return false;
|
||||
}
|
||||
|
||||
bool addressesInDbAndPrimaryDc(const NetworkAddressList& addresses, Reference<AsyncVar<ServerDBInfo>> dbInfo) {
|
||||
bool addressesInDbAndPrimaryDc(const NetworkAddressList& addresses, Reference<AsyncVar<ServerDBInfo> const> dbInfo) {
|
||||
return addressInDbAndPrimaryDc(addresses.address, dbInfo) ||
|
||||
(addresses.secondaryAddress.present() && addressInDbAndPrimaryDc(addresses.secondaryAddress.get(), dbInfo));
|
||||
}
|
||||
|
@ -723,10 +723,10 @@ TEST_CASE("/fdbserver/worker/addressInDbAndPrimaryDc") {
|
|||
} // namespace
|
||||
|
||||
// The actor that actively monitors the health of local and peer servers, and reports anomaly to the cluster controller.
|
||||
ACTOR Future<Void> healthMonitor(Reference<AsyncVar<Optional<ClusterControllerFullInterface>>> ccInterface,
|
||||
ACTOR Future<Void> healthMonitor(Reference<AsyncVar<Optional<ClusterControllerFullInterface>> const> ccInterface,
|
||||
WorkerInterface interf,
|
||||
LocalityData locality,
|
||||
Reference<AsyncVar<ServerDBInfo>> dbInfo) {
|
||||
Reference<AsyncVar<ServerDBInfo> const> dbInfo) {
|
||||
loop {
|
||||
Future<Void> nextHealthCheckDelay = Never();
|
||||
if (dbInfo->get().recoveryState >= RecoveryState::ACCEPTING_COMMITS &&
|
||||
|
@ -1212,7 +1212,7 @@ struct SharedLogsValue {
|
|||
};
|
||||
|
||||
ACTOR Future<Void> workerServer(Reference<ClusterConnectionFile> connFile,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>>> ccInterface,
|
||||
Reference<AsyncVar<Optional<ClusterControllerFullInterface>> const> ccInterface,
|
||||
LocalityData locality,
|
||||
Reference<AsyncVar<ClusterControllerPriorityInfo>> asyncPriorityInfo,
|
||||
ProcessClass initialClass,
|
||||
|
|
Loading…
Reference in New Issue