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

Konstantin Osipov kostja.osipov at gmail.com
Wed Oct 16 08:52:38 MSK 2019


* 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.

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