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

Function tryWriteEventToSystemLog

src/Interpreters/TransactionLog.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static void tryWriteEventToSystemLog(LoggerPtr log, ContextPtr context,
38 TransactionsInfoLogElement::Type type, const TransactionID & tid, CSN csn = Tx::UnknownCSN)
39try
40{
41 auto system_log = context->getTransactionsInfoLog();
42 if (!system_log)
43 return;
44
45 TransactionsInfoLogElement elem;
46 elem.type = type;
47 elem.tid = tid;
48 elem.csn = csn;
49 elem.fillCommonFields(nullptr);
50 system_log->add(std::move(elem));
51}
52catch (...)
53{
54 tryLogCurrentException(log);
55}
56
57
58TransactionLog::TransactionLog()

Callers 8

addNewPartMethod · 0.70
beginTransactionMethod · 0.70
rollbackTransactionMethod · 0.70
tryLockRemovalTIDMethod · 0.50
unlockRemovalTIDMethod · 0.50

Calls 4

fillCommonFieldsMethod · 0.80
tryLogCurrentExceptionFunction · 0.50
addMethod · 0.45

Tested by

no test coverage detected