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

Function traceKeyValuesDiff

fdbclient/StorageServerInterface.cpp:152–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152static void traceKeyValuesDiff(TraceEvent& event,
153 const KeySelectorRef& begin,
154 const KeySelectorRef& end,
155 Optional<TenantNameRef> tenant,
156 Version version,
157 int limit,
158 int limitBytes,
159 const VectorRef<KeyValueRef>& ssKV,
160 bool ssMore,
161 const VectorRef<KeyValueRef>& tssKV,
162 bool tssMore) {
163 traceKeyValuesSummary(
164 event, begin, end, tenant, version, limit, limitBytes, ssKV.size(), ssMore, tssKV.size(), tssMore);
165 bool mismatchFound = false;
166 for (int i = 0; i < std::max(ssKV.size(), tssKV.size()); i++) {
167 if (i >= ssKV.size() || i >= tssKV.size() || ssKV[i] != tssKV[i]) {
168 event.detail("MismatchIndex", i);
169 if (i >= ssKV.size() || i >= tssKV.size() || ssKV[i].key != tssKV[i].key) {
170 event.detail("MismatchSSKey", i < ssKV.size() ? ssKV[i].key.printable() : "missing");
171 event.detail("MismatchTSSKey", i < tssKV.size() ? tssKV[i].key.printable() : "missing");
172 } else {
173 event.detail("MismatchKey", ssKV[i].key.printable());
174 event.detail("MismatchSSValue", traceChecksumValue(ssKV[i].value));
175 event.detail("MismatchTSSValue", traceChecksumValue(tssKV[i].value));
176 }
177 mismatchFound = true;
178 break;
179 }
180 }
181 ASSERT(mismatchFound);
182}
183
184template <>
185void TSS_traceMismatch(TraceEvent& event,

Callers 1

TSS_traceMismatchFunction · 0.85

Calls 5

traceKeyValuesSummaryFunction · 0.85
traceChecksumValueFunction · 0.85
detailMethod · 0.80
sizeMethod · 0.45
printableMethod · 0.45

Tested by

no test coverage detected