remove forwarding

This commit is contained in:
Dan Lambright 2021-05-28 11:09:41 -04:00
parent 10289ef8f1
commit cc3175fc50
2 changed files with 3 additions and 9 deletions

View File

@ -254,13 +254,12 @@ struct CheckDescriptorMutableReply {
// Allows client to check if allowed to change the cluster descriptor.
struct CheckDescriptorMutableRequest {
constexpr static FileIdentifier file_identifier = 214729;
Key key;
ReplyPromise<CheckDescriptorMutableReply> reply;
CheckDescriptorMutableRequest() {}
template <class Ar>
void serialize(Ar& ar) {
serializer(ar, key, reply);
serializer(ar, reply);
}
};

View File

@ -564,15 +564,10 @@ ACTOR Future<Void> leaderServer(LeaderElectionRegInterface interf,
loop choose {
when(CheckDescriptorMutableRequest req = waitNext(interf.checkDescriptorMutable.getFuture())) {
Optional<LeaderInfo> forward = regs.getForward(req.key);
// Note the response returns the value of a knob enforced by checking only one coordinator. It is not
// quorum based.
if (forward.present()) {
req.reply.sendError(coordinators_changed());
} else {
CheckDescriptorMutableReply rep(SERVER_KNOBS->ENABLE_CROSS_CLUSTER_SUPPORT);
req.reply.send(rep);
}
CheckDescriptorMutableReply rep(SERVER_KNOBS->ENABLE_CROSS_CLUSTER_SUPPORT);
req.reply.send(rep);
}
when(OpenDatabaseCoordRequest req = waitNext(interf.openDatabase.getFuture())) {
Optional<LeaderInfo> forward = regs.getForward(req.clusterKey);