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 BAFA726742 for ; Mon, 19 Aug 2019 16:47:02 -0400 (EDT) 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 MAmoWQKdR7BN for ; Mon, 19 Aug 2019 16:47:02 -0400 (EDT) Received: from smtp18.mail.ru (smtp18.mail.ru [94.100.176.155]) (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 7736C265B0 for ; Mon, 19 Aug 2019 16:47:02 -0400 (EDT) Received: by smtp18.mail.ru with esmtpa (envelope-from ) id 1hzoYO-0004Gl-Mv for tarantool-patches@freelists.org; Mon, 19 Aug 2019 23:47:00 +0300 Date: Mon, 19 Aug 2019 23:47:00 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 2/7] vinyl: don't exempt dropped indexes from dump and compaction Message-ID: <20190819204700.GC21602@atlas> References: <67030c30de327fbceaf2c204eec11a3745869533.1566233187.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67030c30de327fbceaf2c204eec11a3745869533.1566233187.git.vdavydov.dev@gmail.com> 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 * Vladimir Davydov [19/08/19 19:57]: > vy_lsm_read_set_t read_set; > + /** > + * Triggers run when the last reference to this LSM tree > + * is dropped and the LSM tree is about to be destroyed. > + * A pointer to this LSM tree is passed to the trigger > + * callback in the 'event' argument. > + */ > + struct rlist on_destroy; Please explain in the comment that the compaction scheduler task takes a reference as well, so if the dropped index happens to be compacted at the moment, it will be dropped only when the compaction task finishes. Why did you add a trigger - to avoid dependency loops between vy_lsm and vy_scheduler? But sounds like it's simpler to make vy_lsm aware in vy_scheduler and register/unregister itself in create/destroy. Why did you choose to add a trigger instead? -- Konstantin Osipov, Moscow, Russia