Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] box: don't allow referenced collation to be dropped
Date: Tue, 12 Nov 2019 16:24:37 +0300	[thread overview]
Message-ID: <20191112132437.GB96411@tarantool.org> (raw)
In-Reply-To: <fbd2a38b-d7cd-2cee-d89a-4fbf38139667@tarantool.org>

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.
 
> tarantool> key_def = require('key_def')
> ---
> ...
> 
> tarantool> kd = key_def.new({{fieldno = 1, collation = 'unicode', type = 'string'}})
> ---
> ...
> 
> tarantool> box.space._collation:delete(1)
> ---
> - [1, 'unicode', 1, 'ICU', '', {'strength': 'tertiary'}]
> ...
> 
> tarantool> kd
> Assertion failed: (coll_id != NULL), function luaT_push_key_def, file /Users/gerold/Work/Repositories/tarantool/src/box/lua/key_def.c, line 67.
> Process 50999 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
>     frame #0: 0x00007fff688be2c6 libsystem_kernel.dylib`__pthread_kill + 10
> libsystem_kernel.dylib`__pthread_kill:
> ->  0x7fff688be2c6 <+10>: jae    0x7fff688be2d0            ; <+20>
>     0x7fff688be2c8 <+12>: movq   %rax, %rdi
>     0x7fff688be2cb <+15>: jmp    0x7fff688b8457            ; cerror_nocancel
>     0x7fff688be2d0 <+20>: retq   
> Target 0: (tarantool) stopped.

  reply	other threads:[~2019-11-12 13:24 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 [this message]
2019-11-13  4:37     ` Konstantin Osipov

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=20191112132437.GB96411@tarantool.org \
    --to=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