[commits] [tarantool] 02/02: alter: do not require index rebuild to clear uniqueness
Vladimir Davydov
vdavydov.dev at gmail.com
Fri Feb 9 11:57:13 MSK 2018
On Thu, Feb 08, 2018 at 11:01:54PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/02/05 16:51]:
> > This is an automated email from the git hooks/post-receive script.
> >
> > alter: do not require index rebuild to clear uniqueness
> >
> > Obviously, there's no point in rebuilding an index if all we do is
> > relaxing the uniqueness property. This will also allow us to clear
> > the uniqueness flag for vinyl indexes, which do not support rebuild.
> >
> > Note, a memtx tree index stores a pointer to either cmp_def or key_def
> > depending on whether the index is unique. Hence to clear the uniqueness
> > flag without rebuilding the index, we need to update this pointer. To do
> > that, we add a new index virtual method, update_def.
> >
> > Closes #2449
>
> I don't see this patch in patches at . I am pushing it.
It should be there, please check your MUA.
>
> I don't however understand a related issue, how
> generic_index_update_def can work in vinyl. I can see you forbade
> changing a non-empty vinyl index, but you still can change an
> empty one, and with generic implementation, your memory references
> in all the derived formats you should be screwed, no? Or this case
> is handled by vinyl_engine_commit_alter, so it works fine?
Neither disk nor memory format depends on the index uniqueness so it
should work fine. That's why I added the corresponding test case to
vinyl/ddl.
>
> Seems like we use update_def and commit_alter for the same
> purpose, and it is confusing.
More information about the Tarantool-patches
mailing list