[Tarantool-patches] [PATCH] box: don't allow referenced collation to be dropped

Konstantin Osipov kostja.osipov at gmail.com
Wed Nov 13 07:37:04 MSK 2019


* Nikita Pettik <korablev at 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


More information about the Tarantool-patches mailing list