From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BC1BE274F3 for ; Fri, 8 Feb 2019 11:50:42 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MVkMTW9mnB21 for ; Fri, 8 Feb 2019 11:50:42 -0500 (EST) Received: from smtp10.mail.ru (smtp10.mail.ru [94.100.181.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 6FC78262B6 for ; Fri, 8 Feb 2019 11:50:42 -0500 (EST) Date: Fri, 8 Feb 2019 19:50:40 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 4/5] Emit NOP if an applier skips row Message-ID: <20190208165040.GB4588@chai> References: <98c96d540bd0d23cdbdf42bb0d91c699afdd3e70.1548152776.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98c96d540bd0d23cdbdf42bb0d91c699afdd3e70.1548152776.git.georgy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Georgy Kirichenko * Georgy Kirichenko [19/01/22 15:45]: > */ > - if (e->type == &type_ClientError && > - box_error_code(e) == ER_TUPLE_FOUND && > - replication_skip_conflict) > - diag_clear(diag_get()); > - else { > - /* Rollback lsn to have a chance for a retry. */ > - vclock_set(&replicaset.applier.vclock, > - row.replica_id, old_lsn); > - latch_unlock(latch); > - diag_raise(); > - } > + diag_clear(diag_get()); > + row.type = IPROTO_NOP; > + row.bodycnt = 0; > + res = xstream_write(applier->subscribe_stream, > + &row); > + } > + if (res != 0) { > + /* Rollback lsn to have a chance for a retry. */ > + vclock_set(&replicaset.applier.vclock, > + row.replica_id, old_lsn); > + latch_unlock(latch); > + diag_raise(); > } Why do you need to manually promote applier.vclock here? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov