Add ConfigFollowerCompactRequest
This commit is contained in:
parent
2f7e752eee
commit
050eb079bd
|
@ -334,7 +334,7 @@ ACTOR Future<Void> pingLatencyLogger(TransportData* self) {
|
|||
}
|
||||
|
||||
TransportData::TransportData(uint64_t transportId)
|
||||
: endpoints(/*wellKnownTokenCount*/ 17), endpointNotFoundReceiver(endpoints), pingReceiver(endpoints),
|
||||
: endpoints(/*wellKnownTokenCount*/ 18), endpointNotFoundReceiver(endpoints), pingReceiver(endpoints),
|
||||
warnAlwaysForLargePacket(true), lastIncompatibleMessage(0), transportId(transportId),
|
||||
numIncompatibleConnections(0) {
|
||||
degraded = makeReference<AsyncVar<bool>>(false);
|
||||
|
|
|
@ -110,23 +110,37 @@ struct ConfigFollowerGetChangesRequest {
|
|||
}
|
||||
};
|
||||
|
||||
struct ConfigFollowerCompactRequest {
|
||||
static constexpr FileIdentifier file_identifier = 568910;
|
||||
Version lastTruncatedVersion;
|
||||
ReplyPromise<Void> reply;
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
serializer(ar, lastTruncatedVersion, reply);
|
||||
}
|
||||
};
|
||||
|
||||
struct ConfigFollowerInterface {
|
||||
static constexpr FileIdentifier file_identifier = 7721102;
|
||||
RequestStream<ConfigFollowerGetVersionRequest> getVersion;
|
||||
RequestStream<ConfigFollowerGetFullDatabaseRequest> getFullDatabase;
|
||||
RequestStream<ConfigFollowerGetChangesRequest> getChanges;
|
||||
RequestStream<ConfigFollowerCompactRequest> compact;
|
||||
|
||||
ConfigFollowerInterface() = default;
|
||||
void setupWellKnownEndpoints() {
|
||||
getVersion.makeWellKnownEndpoint(WLTOKEN_CONFIGFOLLOWER_GETVERSION, TaskPriority::Coordination);
|
||||
getFullDatabase.makeWellKnownEndpoint(WLTOKEN_CONFIGFOLLOWER_GETFULLDB, TaskPriority::Coordination);
|
||||
getChanges.makeWellKnownEndpoint(WLTOKEN_CONFIGFOLLOWER_GETCHANGES, TaskPriority::Coordination);
|
||||
compact.makeWellKnownEndpoint(WLTOKEN_CONFIGFOLLOWER_COMPACT, TaskPriority::Coordination);
|
||||
}
|
||||
|
||||
ConfigFollowerInterface(NetworkAddress const& remote)
|
||||
: getVersion(Endpoint({ remote }, WLTOKEN_CONFIGFOLLOWER_GETVERSION)),
|
||||
getFullDatabase(Endpoint({ remote }, WLTOKEN_CONFIGFOLLOWER_GETFULLDB)),
|
||||
getChanges(Endpoint({ remote }, WLTOKEN_CONFIGFOLLOWER_GETCHANGES)) {}
|
||||
getChanges(Endpoint({ remote }, WLTOKEN_CONFIGFOLLOWER_GETCHANGES)),
|
||||
compact(Endpoint({ remote }, WLTOKEN_CONFIGFOLLOWER_COMPACT)) {}
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
|
|
|
@ -34,6 +34,7 @@ constexpr UID WLTOKEN_GENERATIONREG_WRITE(-1, 9);
|
|||
constexpr UID WLTOKEN_CONFIGFOLLOWER_GETVERSION(-1, 14);
|
||||
constexpr UID WLTOKEN_CONFIGFOLLOWER_GETFULLDB(-1, 15);
|
||||
constexpr UID WLTOKEN_CONFIGFOLLOWER_GETCHANGES(-1, 16);
|
||||
constexpr UID WLTOKEN_CONFIGFOLLOWER_COMPACT(-1, 17);
|
||||
|
||||
struct GenerationRegInterface {
|
||||
constexpr static FileIdentifier file_identifier = 16726744;
|
||||
|
|
|
@ -181,6 +181,10 @@ class SimpleConfigDatabaseNodeImpl {
|
|||
// TODO: Implement
|
||||
continue;
|
||||
}
|
||||
when(ConfigFollowerCompactRequest req = waitNext(cfi->compact.getFuture())) {
|
||||
// TODO: Implement
|
||||
continue;
|
||||
}
|
||||
when(wait(self->actors.getResult())) { ASSERT(false); }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue