From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1B9FB43040C for ; Sat, 15 Aug 2020 00:16:22 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id t6so11326921ljk.9 for ; Fri, 14 Aug 2020 14:16:22 -0700 (PDT) From: Cyrill Gorcunov Date: Sat, 15 Aug 2020 00:14:42 +0300 Message-Id: <20200814211442.667099-9-gorcunov@gmail.com> In-Reply-To: <20200814211442.667099-1-gorcunov@gmail.com> References: <20200814211442.667099-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v7 8/8] applier: drop process_synchro_row List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Handling of synchro requests now are passed via separate apply_synchro_row helper so we no longer need process_synchro_row and can drop it. Closes #5129 Signed-off-by: Cyrill Gorcunov --- src/box/applier.cc | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/src/box/applier.cc b/src/box/applier.cc index a1ce7a23f..7652e1acd 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -270,45 +270,17 @@ process_nop(struct request *request) return txn_commit_stmt(txn, request); } -/* - * CONFIRM/ROLLBACK rows aren't dml requests and require special - * handling: instead of performing some operations on spaces, - * processing these requests requires txn_limbo to either confirm - * or rollback some of its entries. - */ static int -process_synchro_row(struct request *request) +apply_row(struct xrow_header *row) { - assert(iproto_type_is_synchro_request(request->header->type)); - struct txn *txn = in_txn(); + struct request request; - struct synchro_request syn_req; - if (xrow_decode_synchro(request->header, &syn_req) != 0) - return -1; - assert(txn->n_applier_rows == 0); /* - * This is not really a transaction. It just uses txn API - * to put the data into WAL. And obviously it should not - * go to the limbo and block on the very same sync - * transaction which it tries to confirm now. + * Synchro requests must never use txn engine, + * instead they are handled separately. */ - txn_set_flag(txn, TXN_FORCE_ASYNC); + assert(!iproto_type_is_synchro_request(row->type)); - if (txn_begin_stmt(txn, NULL) != 0) - return -1; - if (txn_commit_stmt(txn, request) != 0) - return -1; - return txn_limbo_process(&txn_limbo, &syn_req); -} - -static int -apply_row(struct xrow_header *row) -{ - struct request request; - if (iproto_type_is_synchro_request(row->type)) { - request.header = row; - return process_synchro_row(&request); - } if (xrow_decode_dml(row, &request, dml_request_key_map(row->type)) != 0) return -1; if (request.type == IPROTO_NOP) -- 2.26.2