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

Function debug_checkPartRestoredVersion

fdbrpc/sim_validation.cpp:65–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65bool debug_checkPartRestoredVersion(UID id,
66 int64_t version,
67 std::string context,
68 std::string minormax,
69 Severity sev = SevError) {
70 if (!g_network->isSimulated() || !g_simulator.extraDatabases.empty())
71 return false;
72 if (disabledMachines.count(id))
73 return false;
74 if (!validationData.count(id.toString() + minormax)) {
75 TraceEvent(SevWarn, (context + "UnknownVersion").c_str(), id).detail("RestoredVersion", version);
76 return false;
77 }
78 int sign = minormax == "min" ? 1 : -1;
79 if (version * sign < validationData[id.toString() + minormax] * sign) {
80 TraceEvent(sev, (context + "DurabilityError").c_str(), id)
81 .detail("RestoredVersion", version)
82 .detail("Checking", minormax)
83 .detail("MinVersion", validationData[id.toString() + "min"])
84 .detail("MaxVersion", validationData[id.toString() + "max"]);
85 return true;
86 }
87 return false;
88}
89
90bool debug_checkRestoredVersion(UID id, int64_t version, std::string context, Severity sev) {
91 if (!g_network->isSimulated() || !g_simulator.extraDatabases.empty())

Callers 3

Calls 7

TraceEventClass · 0.85
detailMethod · 0.80
countMethod · 0.65
isSimulatedMethod · 0.45
emptyMethod · 0.45
toStringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected