mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 18:02:31 +08:00
remove forwarding
This commit is contained in:
parent
10289ef8f1
commit
cc3175fc50
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user