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 DA2BF26742 for ; Mon, 19 Aug 2019 16:50:39 -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 U2zDe8WyWIgC for ; Mon, 19 Aug 2019 16:50:39 -0400 (EDT) Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (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 9BB67265B0 for ; Mon, 19 Aug 2019 16:50:39 -0400 (EDT) Received: by smtp60.i.mail.ru with esmtpa (envelope-from ) id 1hzobu-0008QB-7k for tarantool-patches@freelists.org; Mon, 19 Aug 2019 23:50:38 +0300 Date: Mon, 19 Aug 2019 23:50:38 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 4/7] memtx: use ref counting to pin indexes for snapshot Message-ID: <20190819205038.GE21602@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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]: > Currently, to prevent an index from going away while it is being > written to a snapshot, we postpone memtx_gc_task's free() invocation > until checkpointing is complete, see commit 94de0a081b3a ("Don't take > schema lock for checkpointing"). This works fine, but makes it rather > difficult to reuse snapshot iterators for other purposes, e.g. feeding > a consistent read view to a newly joined replica. > > Let's instead use index reference counting for pinning indexes for > checkpointing. A reference is taken in a snapshot iterator constructor > and released when the snapshot iterator is destroyed. lgtm -- Konstantin Osipov, Moscow, Russia