[Tarantool-patches] [PATCH v2 12/16] box: increment schema_version on ddl operations

Konstantin Osipov kostja.osipov at gmail.com
Wed Dec 4 15:03:37 MSK 2019


* Nikita Pettik <korablev at tarantool.org> [19/11/21 10:00]:
> Some DDL operations such as SQL trigger alter, check and foreign
> constraint alter don't result in schema version change. On the other
> hand, we are going to rely on schema version to determine expired
> prepared statements: for instance, if FK constraint has been created
> after DML statement preparation, the latter may ignore FK constraint
> (instead of proper "statement has expired" error). Let's fix it and
> account schema change on each DDL operation.

This is very crude:

- I can't imagine that changing a trigger affects any existing
  statement. It will have its own vdbe, and it doesn't change
  table schema. 

  Constraints need more thinking, but the idea is the same:
  not all schema changes are created equal.

- flushing entire cache on any such change is a huge inefficiency.
  It was not an issue before, but time has come to introduce
  per-object versioning, in addition to global versioning.

This is subject for future work.

So lgtm.


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list