From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladislav Shpilevoy Subject: [PATCH 0/2] schema: expose space_mt and index_mt on box.schema table Date: Sun, 1 Apr 2018 14:02:44 +0300 Message-Id: In-Reply-To: <20180401093352.fyl2hq5r2itnahgr@esperanza> References: <20180401093352.fyl2hq5r2itnahgr@esperanza> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com, Vladislav Shpilevoy List-ID: Branch: http://github.com/tarantool/tarantool/tree/pr-3204-expose-space-index-mt Issue: https://github.com/tarantool/tarantool/issues/3204 Space_mt and index_mt are created individually for each space inside a giant space.bless function. It consumes lua memory by duplicating these metatables (which is very limited), and does not allow to add new functions, which would be visible in all spaces and indexes. Lets move space_mt and index_mt definitions out of space.bless function in box.schema.space/index_mt, and allow to expand them with user functions. Vladislav Shpilevoy (2): schema: move space_mt and index_mt definition out of space bless schema: expose space_mt and index_mt on `box.schema` table src/box/lua/schema.lua | 636 ++++++++++++++++++++-------------------- test/box-tap/schema_mt.test.lua | 79 +++++ 2 files changed, 404 insertions(+), 311 deletions(-) create mode 100755 test/box-tap/schema_mt.test.lua -- 2.14.3 (Apple Git-98)