Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Nikita Pettik <korablev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] box: don't allow referenced collation to be dropped
Date: Wed, 13 Nov 2019 07:37:04 +0300	[thread overview]
Message-ID: <20191113043704.GB1534@atlas> (raw)
In-Reply-To: <20191112132437.GB96411@tarantool.org>

* Nikita Pettik <korablev@tarantool.org> [19/11/12 16:29]:
> On 11 Nov 23:38, Vladislav Shpilevoy wrote:
> > 
> > 3. Collations are referenced not only by indexes and spaces.
> 
> Oh, that's pretty sad. AFAIU there's no way to get list of all
> existing key defs, so it seems that we have to use reference counters.
> I'm going to rework patch and send v2.

This is not going to work reliably - reference counting code tends
to rot and leak references over time.

Basically, if you forget to ref or deref in any place, you will
not see it in a test or in a real life.

While this piece was ugly but contained in one line, the
refcounting will be both ugly and spread all over.

Please either consider having an index on collation, so that all
references can be checked quickly using a data dictionary, or drop
this issue altogether - only a superuser can drop a collation, and
this is never used in practice, so not worth fixing, really.


-- 
Konstantin Osipov, Moscow, Russia

      reply	other threads:[~2019-11-13  4:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 13:52 Nikita Pettik
2019-11-11 21:50 ` Konstantin Osipov
2019-11-11 22:38 ` Vladislav Shpilevoy
2019-11-12 13:24   ` Nikita Pettik
2019-11-13  4:37     ` Konstantin Osipov [this message]

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=20191113043704.GB1534@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] box: don'\''t allow referenced collation to be dropped' \
    /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