MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / assertDigest

Function assertDigest

src/Coordination/KeeperStateMachine.cpp:255–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253{
254
255void assertDigest(
256 const KeeperDigest & expected,
257 const KeeperDigest & actual,
258 const Coordination::ZooKeeperRequest & request,
259 uint64_t log_idx,
260 uint64_t session_id,
261 bool committing)
262{
263 if (!KeeperStorageBase::checkDigest(expected, actual))
264 {
265 LOG_FATAL(
266 getLogger("KeeperStateMachine"),
267 "Digest for nodes is not matching after {} request of type '{}' at log index {} for session {}.\nExpected digest - {}, actual digest - {} "
268 "(digest {}). Keeper will terminate to avoid inconsistencies.\nExtra information about the request:\n{}",
269 committing ? "committing" : "preprocessing",
270 request.getOpNum(),
271 log_idx,
272 session_id,
273 expected.value,
274 actual.value,
275 expected.version,
276 request.toString());
277 std::terminate();
278 }
279}
280
281/// Macros to construct timed lock guards for state_machine_storage_mutex with appropriate ProfileEvents.
282/// We cannot use a factory function because TSA does not track lock ownership across function boundaries.

Callers 7

preprocessMethod · 0.85
commitMethod · 0.85
recoverLostReplicaMethod · 0.85
dropTableMethod · 0.85
renameTableMethod · 0.85
commitCreateTableMethod · 0.85
commitAlterTableMethod · 0.85

Calls 3

getLoggerFunction · 0.50
getOpNumMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected