MCPcopy Create free account
hub / github.com/ByConity/ByConity / syncTransactionStatus

Method syncTransactionStatus

src/Transaction/CnchProxyTransaction.cpp:117–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void CnchProxyTransaction::syncTransactionStatus(bool throw_on_missmatch)
118{
119 /// Call when remote query is done and when precommit the explicit transaction
120 auto expected_status = remote_client->getTransactionStatus(txn_record.txnID().toUInt64());
121 if (throw_on_missmatch && expected_status != txn_record.status())
122 {
123 throw Exception("Transaction " + txn_record.txnID().toString() + " status is not consistent with remote server, expected " + String(txnStatusToString(expected_status)) + ", got " + String(txnStatusToString(txn_record.status())), ErrorCodes::LOGICAL_ERROR);
124 }
125 setStatus(expected_status);
126}
127
128void CnchProxyTransaction::setTransactionStatus(CnchTransactionStatus status)
129{

Callers 1

precommitMethod · 0.80

Calls 8

txnStatusToStringFunction · 0.85
toUInt64Method · 0.80
ExceptionClass · 0.50
StringClass · 0.50
getTransactionStatusMethod · 0.45
txnIDMethod · 0.45
statusMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected