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 200E92574B for ; Mon, 12 Aug 2019 18:24:23 -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 d92KE7dfZqrx for ; Mon, 12 Aug 2019 18:24:23 -0400 (EDT) Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 D3AB325531 for ; Mon, 12 Aug 2019 18:24:22 -0400 (EDT) Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1hxIjl-0005rn-2q for tarantool-patches@freelists.org; Tue, 13 Aug 2019 01:24:21 +0300 Date: Tue, 13 Aug 2019 01:24:20 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 07/13] memtx: use ref counting to pin indexes for snapshot Message-ID: <20190812222420.GZ32337@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/10 23:22]: > 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. I don't see how this can work in general, memtx index can not live without memtx space and tuple format. These are not referenced from the index object. -- Konstantin Osipov, Moscow, Russia