From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4DF83430407 for ; Mon, 17 Aug 2020 23:49:20 +0300 (MSK) References: <20200817133918.875558-1-gorcunov@gmail.com> <20200817133918.875558-6-gorcunov@gmail.com> From: Vladislav Shpilevoy Message-ID: Date: Mon, 17 Aug 2020 22:49:19 +0200 MIME-Version: 1.0 In-Reply-To: <20200817133918.875558-6-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v8 5/9] qsync: direct write of CONFIRM/ROLLBACK into a journal List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml > diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c > index ed8c10419..447630d23 100644 > --- a/src/box/txn_limbo.c > +++ b/src/box/txn_limbo.c > @@ -272,6 +273,17 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) > @@ -284,46 +296,34 @@ txn_limbo_write_synchro(struct txn_limbo *limbo, uint32_t type, int64_t lsn) > -rollback: > - /* > - * XXX: the stub is supposed to be removed once it is defined what to do > - * when a synchro request WAL write fails. One of the possible > - * solutions: log the error, keep the limbo queue as is and probably put > - * in rollback mode. Then provide a hook to call manually when WAL > - * problems are fixed. Or retry automatically with some period. > - */ > - panic("Could not write a synchro request to WAL: lsn = %lld, type = " > - "%s\n", lsn, iproto_type_name(type)); > + if (journal_write(entry) != 0 || entry->res < 0) { > + diag_set(ClientError, ER_WAL_IO); > + diag_log(); > + /* > + * XXX: the stub is supposed to be removed once it is defined what to do > + * when a synchro request WAL write fails. One of the possible > + * solutions: log the error, keep the limbo queue as is and probably put > + * in rollback mode. Then provide a hook to call manually when WAL > + * problems are fixed. Or retry automatically with some period. Still out of 80 symbols. > + */ > + panic("Could not write a synchro request to WAL: lsn = %lld, type = " > + "%s\n", lsn, type == IPROTO_CONFIRM ? "CONFIRM" : "ROLLBACK"); > + } > } > > /** >