Use ObjectWriter to write storage cache data
This allows deserialization of the on disk data in lower FDB versions that don't contain fields added in main.
This commit is contained in:
parent
9fba84bc45
commit
e2e853a30b
|
@ -228,9 +228,11 @@ const Key storageCacheServerKey(UID id) {
|
|||
}
|
||||
|
||||
const Value storageCacheServerValue(const StorageServerInterface& ssi) {
|
||||
BinaryWriter wr(IncludeVersion());
|
||||
wr << ssi;
|
||||
return wr.toValue();
|
||||
auto protocolVersion = currentProtocolVersion;
|
||||
protocolVersion.addObjectSerializerFlag();
|
||||
ObjectWriter writer(IncludeVersion(protocolVersion));
|
||||
writer.serialize(ssi);
|
||||
return writer.toStringRef();
|
||||
}
|
||||
|
||||
const KeyRangeRef ddStatsRange = KeyRangeRef(LiteralStringRef("\xff\xff/metrics/data_distribution_stats/"),
|
||||
|
|
Loading…
Reference in New Issue