[tarantool-patches] Re: [PATCH 07/13] memtx: use ref counting to pin indexes for snapshot

Konstantin Osipov kostja at tarantool.org
Tue Aug 13 01:24:20 MSK 2019


* Vladimir Davydov <vdavydov.dev at gmail.com> [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




More information about the Tarantool-patches mailing list