From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7EBF546971A for ; Wed, 4 Dec 2019 15:03:39 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id v201so5883615lfa.11 for ; Wed, 04 Dec 2019 04:03:39 -0800 (PST) Date: Wed, 4 Dec 2019 15:03:37 +0300 From: Konstantin Osipov Message-ID: <20191204120337.GN6592@atlas> References: <005fe990f2add1906bd106356a6c16efa4f027a3.1574277369.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005fe990f2add1906bd106356a6c16efa4f027a3.1574277369.git.korablev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 12/16] box: increment schema_version on ddl operations List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * Nikita Pettik [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