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

Method traceOneLocalityRecord

fdbrpc/ReplicationPolicy.cpp:117–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void IReplicationPolicy::traceOneLocalityRecord(Reference<LocalityRecord> record,
118 Reference<LocalitySet> const& fromServers) {
119 int localityEntryIndex = record->_entryIndex._id;
120 Reference<KeyValueMap> const& dataMap = record->_dataMap;
121 std::vector<AttribRecord> const& keyValueArray = dataMap->_keyvaluearray;
122
123 TraceEvent("LocalityRecordInfo")
124 .detail("EntryIndex", localityEntryIndex)
125 .detail("KeyValueArraySize", keyValueArray.size());
126 for (int i = 0; i < keyValueArray.size(); ++i) {
127 AttribRecord attribRecord = keyValueArray[i]; // first is key, second is value
128 TraceEvent("LocalityRecordInfo")
129 .detail("EntryIndex", localityEntryIndex)
130 .detail("ArrayIndex", i)
131 .detail("Key", attribRecord.first._id)
132 .detail("Value", attribRecord.second._id)
133 .detail("KeyName", fromServers->keyText(attribRecord.first))
134 .detail("ValueName", fromServers->valueText(attribRecord.second));
135 }
136}
137
138// Validate if the team satisfies the replication policy
139// LocalitySet is the base class about the locality information

Callers

nothing calls this directly

Calls 5

TraceEventClass · 0.85
detailMethod · 0.80
keyTextMethod · 0.80
valueTextMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected