Rename config broadcast interface messages

This commit is contained in:
Lukas Joswiak 2021-08-10 11:03:06 -07:00
parent 833e53f8f0
commit 564a3d69b7
3 changed files with 7 additions and 7 deletions

View File

@ -122,8 +122,8 @@ class ConfigBroadcastInterface {
public: public:
static constexpr FileIdentifier file_identifier = 1676543; static constexpr FileIdentifier file_identifier = 1676543;
RequestStream<ConfigBroadcastSnapshotRequest> getSnapshot; RequestStream<ConfigBroadcastSnapshotRequest> snapshot;
RequestStream<ConfigBroadcastChangesRequest> getChanges; RequestStream<ConfigBroadcastChangesRequest> changes;
ConfigBroadcastInterface() : _id(deterministicRandom()->randomUniqueID()) {} ConfigBroadcastInterface() : _id(deterministicRandom()->randomUniqueID()) {}
@ -133,6 +133,6 @@ public:
template <class Ar> template <class Ar>
void serialize(Ar& ar) { void serialize(Ar& ar) {
serializer(ar, _id, getSnapshot, getChanges); serializer(ar, _id, snapshot, changes);
} }
}; };

View File

@ -119,7 +119,7 @@ class ConfigBroadcasterImpl {
req.mostRecentVersion = mostRecentVersion; req.mostRecentVersion = mostRecentVersion;
// TODO: Retry in event of failure // TODO: Retry in event of failure
++successfulChangeRequest; ++successfulChangeRequest;
return success(client.broadcastInterface.getChanges.getReply(req)); return success(client.broadcastInterface.changes.getReply(req));
} }
ConfigBroadcasterImpl() ConfigBroadcasterImpl()
@ -193,7 +193,7 @@ public:
TraceEvent(SevDebug, "ConfigBroadcasterSnapshotRequest", id) TraceEvent(SevDebug, "ConfigBroadcasterSnapshotRequest", id)
.detail("Size", request.snapshot.size()) .detail("Size", request.snapshot.size())
.detail("Version", request.version); .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, void applyChanges(Standalone<VectorRef<VersionedConfigMutationRef>> const& changes,

View File

@ -284,12 +284,12 @@ class LocalConfigurationImpl {
ACTOR static Future<Void> consumeInternal(LocalConfigurationImpl* self, ConfigBroadcastInterface broadcaster) { ACTOR static Future<Void> consumeInternal(LocalConfigurationImpl* self, ConfigBroadcastInterface broadcaster) {
loop { loop {
choose { choose {
when(ConfigBroadcastSnapshotRequest snapshotReq = waitNext(broadcaster.getSnapshot.getFuture())) { when(ConfigBroadcastSnapshotRequest snapshotReq = waitNext(broadcaster.snapshot.getFuture())) {
ASSERT_GT(snapshotReq.version, self->lastSeenVersion); ASSERT_GT(snapshotReq.version, self->lastSeenVersion);
++self->snapshots; ++self->snapshots;
wait(setSnapshot(self, std::move(snapshotReq.snapshot), snapshotReq.version)); 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)); wait(self->addChanges(req.changes, req.mostRecentVersion));
req.reply.send(ConfigBroadcastChangesReply()); req.reply.send(ConfigBroadcastChangesReply());
} }