From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: =?utf-8?B?0JPQtdC+0YDQs9C40Lkg0JrQuNGA0LjRh9C10L3QutC+?= Subject: Re: [tarantool-patches] [PATCH v3 07/14] wal: remove fiber from a journal_entry structure Date: Thu, 13 Jun 2019 22:33:37 +0300 Message-ID: <1927249.GYfve5z4RM@home.lan> In-Reply-To: <20190613141702.rd2el6drnu7keku5@esperanza> References: <20190613141702.rd2el6drnu7keku5@esperanza> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2463773.uQmX4HtBhH"; micalg="pgp-sha256"; protocol="application/pgp-signature" To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: --nextPart2463773.uQmX4HtBhH Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Thursday, June 13, 2019 5:17:02 PM MSK Vladimir Davydov wrote: > On Sun, Jun 09, 2019 at 11:44:36PM +0300, Georgy Kirichenko wrote: > > Use a fiber_cond to signal a condition and wake up a waiting fiber. > > This relaxes friction between fiber and transaction life cycles. > > I don't see how it relaxes anything ;-) > > Please be more specific when writing comments. Oh, thanks, I will do it > > > + > > Using a fiber_cond to wake up a single fiber is an overkill. You could > as well do > > while (!entry->done) > fiber_yield_timeout(TIMEOUT_INFINITY); It is not even possible. In common case (an asynchronous transaction for instance) WAL doesn't know which fiber should be awaken and even does such fiber exist. Please consider following case: an applier fired a transaction and died. Transaction is finished and could be finalized in any fiber which possible doesn't exist in this time. So the one way I see do handle this is to let fiber subscribe on transaction done. If you could offer me with better solution I would be happy. > > Anyway, I have my reservations re how you handle WAL writer wakeups. > Please see my comments to the final patch. --nextPart2463773.uQmX4HtBhH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEFB+nbqWGnp59Rk9ZFSyY70x8X3sFAl0CpREACgkQFSyY70x8 X3tA6Qf5Ab5MMKFLkka31G4UuKKtFLnuohXZN7s9KzrSkw5+4/gPtMoAmhh2UZuT LYAMqKqrWhHU+QnsquUErIB2l0QQUas1nnV1Xq1qcc5E6NwBHEI4pTpMvDdhYfmq 7qkmMJu8FSS+TUD5E0+ryaZRQjzmfp8yLm1XzHhG/pb89hwGv3Km8hirigBLV7u+ qUGkvOcFg+p+2muwOYmojAffnrvXgEQMzWinHBXMsMtLaJEv8s88K75Nw1/iKsp/ 9H5A35H6lDR2s1bZbR/l/VLIVfK/oW8l7BrRcDkzMkJZDdGR89/ShOciWf2/IV8x 5fMtYmQuENcrvb1FCbJ1zUMJRZ882A== =XvwD -----END PGP SIGNATURE----- --nextPart2463773.uQmX4HtBhH--