Minor configuration database bug fixes
This commit is contained in:
parent
21e5456230
commit
fc0fbfb5dc
|
|
@ -24,7 +24,5 @@
|
|||
ConfigKey ConfigKeyRef::decodeKey(KeyRef const& key) {
|
||||
auto tuple = Tuple::unpack(key);
|
||||
ASSERT(tuple.size() == 2); // TODO: Fail gracefully
|
||||
ASSERT(tuple.getType(0) == Tuple::BYTES);
|
||||
ASSERT(tuple.getType(1) == Tuple::BYTES);
|
||||
return ConfigKeyRef(tuple.getString(0), tuple.getString(1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class LocalConfigurationImpl {
|
|||
choose {
|
||||
when(wait(broadcaster->onChange())) {}
|
||||
when(wait(brokenPromiseToNever(fetchChanges(self, broadcaster->get())))) {
|
||||
wait(delay(0.5)); // TODO: Make knob?
|
||||
wait(delay(5.0)); // TODO: Make knob?
|
||||
}
|
||||
when(wait(monitor)) { ASSERT(false); }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class SimpleConfigDatabaseNodeImpl {
|
|||
return Void();
|
||||
}
|
||||
state Optional<Value> value =
|
||||
wait(self->kvStore->readValue(BinaryWriter::toValue(req.key, Unversioned()).withPrefix(kvKeys.begin)));
|
||||
wait(self->kvStore->readValue(BinaryWriter::toValue(req.key, IncludeVersion()).withPrefix(kvKeys.begin)));
|
||||
Standalone<VectorRef<VersionedConfigMutationRef>> versionedMutations = wait(getMutations(self, 0, req.version));
|
||||
for (const auto &versionedMutation : versionedMutations) {
|
||||
const auto &mutation = versionedMutation.mutation;
|
||||
|
|
|
|||
Loading…
Reference in New Issue