MCPcopy Create free account
hub / github.com/apple/foundationdb / decodeServerTagValue

Function decodeServerTagValue

fdbclient/SystemData.cpp:636–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636Tag decodeServerTagValue(ValueRef const& value) {
637 Tag s;
638 BinaryReader reader(value, IncludeVersion());
639 if (!reader.protocolVersion().hasTagLocality()) {
640 int16_t id;
641 reader >> id;
642 if (id == invalidTagOld) {
643 s = invalidTag;
644 } else if (id == txsTagOld) {
645 s = txsTag;
646 } else {
647 ASSERT(id >= 0);
648 s.id = id;
649 s.locality = tagLocalityUpgraded;
650 }
651 } else {
652 reader >> s;
653 }
654 return s;
655}
656
657const Key serverTagConflictKeyFor(Tag tag) {
658 BinaryWriter wr(Unversioned());

Calls 2

IncludeVersionFunction · 0.85
protocolVersionMethod · 0.45

Tested by

no test coverage detected