Merge branch 'features/broadcaster-push' of github.com:sfc-gh-ljoswiak/foundationdb into features/broadcaster-push

This commit is contained in:
Lukas Joswiak 2021-08-10 12:08:16 -07:00
commit 598b23f8d4
2 changed files with 7 additions and 1 deletions

View File

@ -84,6 +84,11 @@ class ConfigBroadcasterImpl {
template <class Changes>
Future<Void> pushChanges(BroadcastClientDetails& client, Changes const& changes) {
// Skip if client has already seen the latest version.
if (client.lastSeenVersion >= mostRecentVersion) {
return Void();
}
ConfigBroadcastChangesRequest req;
for (const auto& versionedMutation : changes) {
if (versionedMutation.version > client.lastSeenVersion &&
@ -314,7 +319,7 @@ Future<Void> ConfigBroadcaster::registerWorker(Version lastSeenVersion,
ConfigClassSet configClassSet,
Future<Void> watcher,
ConfigBroadcastInterface broadcastInterface) {
return impl().registerWorker(this, lastSeenVersion, configClassSet, watcher, broadcastInterface);
return impl().registerWorker(this, lastSeenVersion, std::move(configClassSet), watcher, broadcastInterface);
}
void ConfigBroadcaster::applyChanges(Standalone<VectorRef<VersionedConfigMutationRef>> const& changes,

View File

@ -781,6 +781,7 @@ TEST_CASE("/fdbserver/ConfigDB/Transaction/CompactThenGetConfigClasses") {
return Void();
}
// TODO: The below tests seem to always segfault
TEST_CASE("/fdbserver/ConfigDB/Transaction/GetKnobs") {
wait(testGetKnobs(params, false, false));
return Void();