Skip to content

Commit b39ab04

Browse files
author
michael stack
committed
Skip rather than fail bad edit -- a bad edit we'd added trying to fix fetchkeys
1 parent c1fc850 commit b39ab04

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

fdbclient/SystemData.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,16 @@ void decodeServerKeysValue(const ValueRef& value,
627627
emptyRange = false;
628628
id = UID();
629629
} else {
630+
// Value is unrecognized and too short to be a versioned UID
631+
if (value.size() < sizeof(ProtocolVersion)) {
632+
TraceEvent(SevWarnAlways, "DecodeServerKeysValueUnknown")
633+
.detail("Value", value.toHexString())
634+
.detail("Size", value.size());
635+
assigned = false;
636+
emptyRange = false;
637+
id = UID();
638+
return;
639+
}
630640
BinaryReader rd(value, IncludeVersion());
631641
ASSERT(rd.protocolVersion().hasShardEncodeLocationMetaData());
632642
rd >> id;

0 commit comments

Comments
 (0)