From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: =?utf-8?B?0JPQtdC+0YDQs9C40Lkg0JrQuNGA0LjRh9C10L3QutC+?= Subject: Re: [tarantool-patches] [PATCH 3/4] vinyl: abort affected transactions when space is removed from cache Date: Mon, 25 Mar 2019 12:03:49 +0300 Message-ID: <1998171.O3LcuNtF7R@home.lan> In-Reply-To: <20190325082107.ihfoj2lx7ex2rvkj@esperanza> References: <4522466.B0yFr5P2XB@home.lan> <20190325082107.ihfoj2lx7ex2rvkj@esperanza> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5308562.bKxAJYY8Pu"; micalg="pgp-sha256"; protocol="application/pgp-signature" To: Vladimir Davydov Cc: tarantool-patches@freelists.org, kostja@tarantool.org List-ID: --nextPart5308562.bKxAJYY8Pu Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" On Monday, March 25, 2019 11:21:07 AM MSK Vladimir Davydov wrote: > On Mon, Mar 25, 2019 at 08:45:41AM +0300, =D0=93=D0=B5=D0=BE=D1=80=D0=B3= =D0=B8=D0=B9 =D0=9A=D0=B8=D1=80=D0=B8=D1=87=D0=B5=D0=BD=D0=BA=D0=BE wrote: > > > +static void > > > +vinyl_space_invalidate(struct space *space) > > > +{ > > > + struct vy_env *env =3D vy_env(space->engine); > > > + /* > > > + * Abort all transactions involving the invalidated space. > > > + * An aborted transaction doesn't allow any DML/DQL requests > > > + * so the space won't be used anymore and can be safely > > > + * destroyed. > > > + * > > > + * There's a subtle corner case though - a transaction can > > > + * be reading disk from a DML request right now, with this > > > + * space passed to it in the argument list. However, it's > > > + * handled as well: the iterator will return an error as > > > + * soon as it's done reading disk, which will make the DML > > > + * request bail out early, without dereferencing the space. > > > + */ > > > + tx_manager_abort_writers_for_ddl(env->xm, space); > >=20 > > As tx_manager_abort_writers_for_ddl ignores applier sessions it wouldn't > > fix the issue. I think a separate function should be introduced. >=20 > Wrong. It's tx_manager_abort_writers_for_ro that treats appliers in a > special way; tx_manager_abort_writers_for_ddl aborts all transactions > involving the given space, irrespective of the session type. Sorry, it was my mistake --nextPart5308562.bKxAJYY8Pu 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+nbqWGnp59Rk9ZFSyY70x8X3sFAlyYmXUACgkQFSyY70x8 X3tvCAf/V20+enYolgdjyF2v+kJ422onAHJfvCM+gQtm4+RVRtMvwZYS1VCIRyOr TzDIuHYNSJWSe8Bj4EMA0TfuNMfIxjYNuBTzVhnmv1WnE4X4gHJbpHrIq6geuBSQ ziFA8hgkPL6TQ/8+HU75M7EVpnvvCpQ6nDZZ7ftbF0aT3BZPqrAW/hCfaEX0GzOF R1QkZp91NthUDBlJPBlN3XVyhBZrEskAoGELXt1LKLsgtXxh/eEoJpjZQR9hF10F LliTH0xGngTZxC4TQCj/fuHZxll99wmzEYZicogSYRDl4bMT5af5ua2I8HWTRfk0 0Gy3Te6u5oyEvKdweahoaKKFq9kucA== =tLDR -----END PGP SIGNATURE----- --nextPart5308562.bKxAJYY8Pu--