Rename config broadcast interface messages
This commit is contained in:
parent
833e53f8f0
commit
564a3d69b7
|
@ -122,8 +122,8 @@ class ConfigBroadcastInterface {
|
|||
|
||||
public:
|
||||
static constexpr FileIdentifier file_identifier = 1676543;
|
||||
RequestStream<ConfigBroadcastSnapshotRequest> getSnapshot;
|
||||
RequestStream<ConfigBroadcastChangesRequest> getChanges;
|
||||
RequestStream<ConfigBroadcastSnapshotRequest> snapshot;
|
||||
RequestStream<ConfigBroadcastChangesRequest> changes;
|
||||
|
||||
ConfigBroadcastInterface() : _id(deterministicRandom()->randomUniqueID()) {}
|
||||
|
||||
|
@ -133,6 +133,6 @@ public:
|
|||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
serializer(ar, _id, getSnapshot, getChanges);
|
||||
serializer(ar, _id, snapshot, changes);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ class ConfigBroadcasterImpl {
|
|||
req.mostRecentVersion = mostRecentVersion;
|
||||
// TODO: Retry in event of failure
|
||||
++successfulChangeRequest;
|
||||
return success(client.broadcastInterface.getChanges.getReply(req));
|
||||
return success(client.broadcastInterface.changes.getReply(req));
|
||||
}
|
||||
|
||||
ConfigBroadcasterImpl()
|
||||
|
@ -193,7 +193,7 @@ public:
|
|||
TraceEvent(SevDebug, "ConfigBroadcasterSnapshotRequest", id)
|
||||
.detail("Size", request.snapshot.size())
|
||||
.detail("Version", request.version);
|
||||
return success(clients.back().broadcastInterface.getSnapshot.getReply(request));
|
||||
return success(clients.back().broadcastInterface.snapshot.getReply(request));
|
||||
}
|
||||
|
||||
void applyChanges(Standalone<VectorRef<VersionedConfigMutationRef>> const& changes,
|
||||
|
|
|
@ -284,12 +284,12 @@ class LocalConfigurationImpl {
|
|||
ACTOR static Future<Void> consumeInternal(LocalConfigurationImpl* self, ConfigBroadcastInterface broadcaster) {
|
||||
loop {
|
||||
choose {
|
||||
when(ConfigBroadcastSnapshotRequest snapshotReq = waitNext(broadcaster.getSnapshot.getFuture())) {
|
||||
when(ConfigBroadcastSnapshotRequest snapshotReq = waitNext(broadcaster.snapshot.getFuture())) {
|
||||
ASSERT_GT(snapshotReq.version, self->lastSeenVersion);
|
||||
++self->snapshots;
|
||||
wait(setSnapshot(self, std::move(snapshotReq.snapshot), snapshotReq.version));
|
||||
}
|
||||
when(state ConfigBroadcastChangesRequest req = waitNext(broadcaster.getChanges.getFuture())) {
|
||||
when(state ConfigBroadcastChangesRequest req = waitNext(broadcaster.changes.getFuture())) {
|
||||
wait(self->addChanges(req.changes, req.mostRecentVersion));
|
||||
req.reply.send(ConfigBroadcastChangesReply());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue