forward back new coordinator

This commit is contained in:
Dan Lambright 2021-04-28 08:48:15 -04:00
parent fcfb78162c
commit fc65154b5d
2 changed files with 17 additions and 12 deletions

View File

@ -562,9 +562,14 @@ ACTOR Future<Void> leaderServer(LeaderElectionRegInterface interf, OnDemandStore
loop choose {
when(CheckDescriptorMutable req = waitNext(interf.checkDescriptorMutable.getFuture())) {
Optional<LeaderInfo> forward = regs.getForward(req.key);
if (forward.present()) {
req.reply.send(CheckDescriptorMutableReply{false});
} else {
CheckDescriptorMutableReply rep(SERVER_KNOBS->ENABLE_CROSS_CLUSTER_SUPPORT ? true : false);
req.reply.send(rep);
}
}
when(OpenDatabaseCoordRequest req = waitNext(interf.openDatabase.getFuture())) {
Optional<LeaderInfo> forward = regs.getForward(req.clusterKey);
if (forward.present()) {