From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 D099846970E for ; Mon, 3 Feb 2020 22:54:06 +0300 (MSK) From: Georgy Kirichenko Date: Mon, 03 Feb 2020 22:54:06 +0300 Message-ID: <4233716.LvFx2qVVIh@localhost> In-Reply-To: <20200131195723.GA12445@uranus> References: <20200124151706.18482-1-gorcunov@gmail.com> <20200131194448.GA17326@atlas> <20200131195723.GA12445@uranus> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2168621.ElGaqSPkdT"; micalg="pgp-sha256"; protocol="application/pgp-signature" Subject: Re: [Tarantool-patches] [PATCH] box/txn: do not zap fiber txn pointer before txn_write_to_wal completes List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov , tarantool-patches@dev.tarantool.org --nextPart2168621.ElGaqSPkdT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Friday, 31 January 2020 22:57:23 MSK Cyrill Gorcunov wrote: > On Fri, Jan 31, 2020 at 10:44:48PM +0300, Konstantin Osipov wrote: > > I believe Georgy added this for a reason - since the current fiber > > is no longer locked until the transaction is resumed, it should > > be removed from the fiber key (this change AFAIU comes from > > parallel applier patch). > > > > I suggest you move this statement inside txn_write_to_wal(). I > > can't find a good place for it yet though. > > Thanks for idea, Kostya! The my patch above didn't work simply > because if I don't set NULL here it start triggering assertion > in another places. IOW, I filed this issue and will back to > it on the next week I hope. I'll show you the result. Kostja is right - the intention was to detach a transaction from a fiber. The first step is being able to fire a transaction to wal and forget aboit it because all transaction finalization logic could be implemented via on_commit/ on_rollback trigger. The reason to setup fiber while transaction on_commit/ on_rollback is backward compatibility - some transaction finalization triggers use in_txn() macro. So it makes the applier able to process transactions logging in parallel. The second step I would like to implement is processing more than one transaction simultaneously, for instance we can be able to fire an autonomous transaction for sequences while a primary transaction still in progress and preserve such autonomous transaction effect even when the primary one is going to be rolled back. Note: the second feature is limited until a transaction manager is implemented because simultaneous transactions shall be non-conflicting. --nextPart2168621.ElGaqSPkdT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEECXG+Yw5ArYcP8x5wDVHWG5PoUw4FAl44el4ACgkQDVHWG5Po Uw6tAgf/XqYOqq5128idlukWqXt8uTfQ3TIletvRTfxSoQzhktE/EXO37cHW41Fk 88sQwk/4h1bAGH7Xus6Agp+kqnofrJw9kF2C8gm8Q8qqrZl8Q6QiaqwYHoGK704J IhzBbUZ8ec7RHb99bP8ZZnW4YvgFJrPJl7e4oAZCUVzzWyZkjypgwULlZjBwJ1kc TWHHRrvtTPF7Tlp1mj9kQHav6HySCYapjt6/TacqfsbYJU+qZxUNazRKUGRwvw1y DuP36U2xttvOHfAaQmx9YNA5+vh3AxVQ1oDCiA22AGKt2+HaCQjxfDROY+k8Fy7T Sia+pb2P+zauJ8P0Cbgtol8w/6DVQA== =WLdL -----END PGP SIGNATURE----- --nextPart2168621.ElGaqSPkdT--