| 63 | } |
| 64 | |
| 65 | bool 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 | |
| 90 | bool debug_checkRestoredVersion(UID id, int64_t version, std::string context, Severity sev) { |
| 91 | if (!g_network->isSimulated() || !g_simulator.extraDatabases.empty()) |
no test coverage detected