[tarantool-patches] Re: [PATCH v2 4/7] memtx: use ref counting to pin indexes for snapshot

Konstantin Osipov kostja at tarantool.org
Mon Aug 19 23:50:38 MSK 2019


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




More information about the Tarantool-patches mailing list