| 2254 | } |
| 2255 | |
| 2256 | Status ClientRequestState::CommitKuduTransaction() { |
| 2257 | DCHECK(InKuduTransaction()); |
| 2258 | // Skip calling Commit() for Kudu Transaction with a debug action so that test code |
| 2259 | // could explicitly control over calling Commit(). |
| 2260 | Status status = DebugAction(exec_request().query_options, "CRS_NOT_COMMIT_KUDU_TXN"); |
| 2261 | if (UNLIKELY(!status.ok())) { |
| 2262 | VLOG(1) << Substitute("Skip to commit Kudu transaction with query-id: $0", |
| 2263 | PrintId(query_ctx_.query_id)); |
| 2264 | transaction_closed_ = true; |
| 2265 | return Status::OK(); |
| 2266 | } |
| 2267 | |
| 2268 | status = frontend_->CommitKuduTransaction(query_ctx_.query_id); |
| 2269 | if (status.ok()) { |
| 2270 | query_events_->MarkEvent("Kudu transaction committed"); |
| 2271 | transaction_closed_ = true; |
| 2272 | } else { |
| 2273 | VLOG(1) << Substitute("Unable to commit Kudu transaction with query-id: $0", |
| 2274 | PrintId(query_ctx_.query_id)); |
| 2275 | } |
| 2276 | return status; |
| 2277 | } |
| 2278 | |
| 2279 | void ClientRequestState::LogQueryEvents() { |
| 2280 | // Wait until the results are available. This guarantees the completion of non QUERY |
nothing calls this directly
no test coverage detected