| 114 | } |
| 115 | |
| 116 | void CnchWorkerTransaction::precommit() |
| 117 | { |
| 118 | LOG_DEBUG(log, "Transaction {} starts pre commit\n", txn_record.txnID().toUInt64()); |
| 119 | if (auto status = getStatus(); status != CnchTransactionStatus::Running) |
| 120 | throw Exception("Cannot precommit a transaction that is " + String(txnStatusToString(status)), ErrorCodes::LOGICAL_ERROR); |
| 121 | checkServerClient(); |
| 122 | { |
| 123 | auto lock = getLock(); |
| 124 | server_client->precommitTransaction(getContext(), getTransactionID(), getMainTableUUID()); |
| 125 | txn_record.prepared = true; |
| 126 | } |
| 127 | |
| 128 | assertLockAcquired(); |
| 129 | LOG_DEBUG(log, "Transaction {} successfully finished pre commit.", txn_record.txnID().toUInt64()); |
| 130 | } |
| 131 | |
| 132 | TxnTimestamp CnchWorkerTransaction::commit() |
| 133 | { |
nothing calls this directly
no test coverage detected