[Tarantool-patches] [tarantool-patches] Re: [PATCH v4 1/4] box: add an ability to disable CK constraints

Nikita Pettik korablev at tarantool.org
Wed Oct 16 14:19:50 MSK 2019


On 16 Oct 08:52, Konstantin Osipov wrote:
> * Nikita Pettik <korablev at tarantool.org> [19/10/16 08:45]:
> > On 15 Oct 14:13, Kirill Shcherbatov wrote:
> > > > -> when processed data is verified and constraints validation
> > > > is not required. For instance, during casual recovery process there's
> > > > no need to provide any checks since data is assumed to be consistent.
> > > Applied.
> > > 
> > > > Also explain why we have to store this option.
> > > > To be honest, I doubt that 'is_enable' option should be persisted..
> > > > At least, we can assume that it is always 'on' by default, so that
> > > > save user from having to specify this option each time.
> > > 
> > > Verbally discussed. To implement a behavior that Oracle users are familiar with.
> > > It was a Kostya's point of view and it is already implemented.
> > 
> > Verbally I said that 'somebody told me to do so' is a quite weak argument.
> > So we either add fine rationale for this feature or remove it. Since it
> > was not my suggestion I can't say why do we need it.
> 
> Nikita, if the option is not stored the following scenario is
> possible:
> 
> - the option is turned off
> - data is changed so that a constraint is violated
> - the system is restarted while the option state is lost
> - there is no way (even in theory) to discover it and find that
>   data is incorrect.

Thanks for the scenario, now it looks reasonable. On the other hand,
if we decided to always run check constraints (both on casual and force
recovery), we would easily find out that data violates contraints.

Kirill, could you please extend commit message with Konstantin's explanation?

> If the option is persistent you can run a check when it is turned
> back on again.
> 
> If we don't store the option, we should not wire it up in the
> interface and only use internally, during recovery, which would
> make it difficult to test the option.
> >  
> 
> -- 
> Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list