Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH v2 2/7] vinyl: don't exempt dropped indexes from dump and compaction
Date: Tue, 20 Aug 2019 11:12:27 +0300	[thread overview]
Message-ID: <20190820081227.GQ13834@esperanza> (raw)
In-Reply-To: <20190819204700.GC21602@atlas>

On Mon, Aug 19, 2019 at 11:47:00PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [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.

True. We could avoid that, but for now it isn't worth bothering about
IMO. I'll add a comment.

> 
> 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?

To avoid a dependency loop: vy_scheduler.[hc] depends on vy_lsm.[hc],
but not vice versa, which is nice IMO.

Besides, I think we could reuse the trigger for other purposes, e.g. to
force data file deletion when an index is finally released.

  reply	other threads:[~2019-08-20  8:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 16:53 [PATCH v2 0/7] Join replicas off the current read view Vladimir Davydov
2019-08-19 16:53 ` [PATCH v2 1/7] vinyl: don't pin index for iterator lifetime Vladimir Davydov
2019-08-19 20:35   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 16:53 ` [PATCH v2 2/7] vinyl: don't exempt dropped indexes from dump and compaction Vladimir Davydov
2019-08-19 20:47   ` [tarantool-patches] " Konstantin Osipov
2019-08-20  8:12     ` Vladimir Davydov [this message]
2019-08-20  9:02       ` Vladimir Davydov
2019-08-20 11:52       ` Konstantin Osipov
2019-08-20 14:16   ` Vladimir Davydov
2019-08-19 16:53 ` [PATCH v2 3/7] vinyl: get rid of vy_env::join_lsn Vladimir Davydov
2019-08-19 20:49   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 16:53 ` [PATCH v2 4/7] memtx: use ref counting to pin indexes for snapshot Vladimir Davydov
2019-08-19 20:50   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 16:53 ` [PATCH v2 5/7] memtx: enter small delayed free mode from snapshot iterator Vladimir Davydov
2019-08-19 20:51   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 16:53 ` [PATCH v2 6/7] space: get rid of apply_initial_join_row method Vladimir Davydov
2019-08-19 20:54   ` [tarantool-patches] " Konstantin Osipov
2019-08-19 16:53 ` [PATCH v2 7/7] relay: join new replicas off read view Vladimir Davydov
2019-08-19 20:57   ` [tarantool-patches] " Konstantin Osipov
2019-08-20  8:16     ` Vladimir Davydov
2019-08-20 11:53       ` Konstantin Osipov
2019-08-20 12:05         ` Vladimir Davydov
2019-08-20 13:50           ` Konstantin Osipov
2019-08-20 14:03             ` Vladimir Davydov
2019-08-21 22:08               ` Konstantin Osipov
2019-08-22  8:05                 ` Vladimir Davydov
2019-08-19 16:54 ` [PATCH v2 0/7] Join replicas off the current " Vladimir Davydov
2019-08-20  8:53 ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190820081227.GQ13834@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] Re: [PATCH v2 2/7] vinyl: don'\''t exempt dropped indexes from dump and compaction' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox