Use caches instead of system tables for internal metadata access
In tarantool there are various caches for system objects, like space_cache (space_cache.c) and user cache user_registry in user.cc
In picodata there are cases when we need metadata from system tables. Namely during planning sbroad needs to lookup all spaces in order to see their distribution parameters, so currently it fetches them from _pico_table system table. During acl checks we fetch user to get their names/owner id etc.
Open questions:
- Lets have clear motivation why we need caches in front of system tables first
- Do we export tarantool caches to picodata or define our own. First has the advantage of already being written, the disadvantage is that we cant use them as is because we need fields that belong to picodata and are absent in vanilla caches (distribution in sbroad) and they're not exposed in ffi. Additionally we should be mindful of friction added by ffi and possibly cross-repo communication when we a) implement this feature b) need some extension in the future (add new field).
TopologyCache
В !1491 (merged) мы добавили TopologyCache, который хранит десериализованное представление некоторых системных таблиц описывающих топологию кластера. Нужно использовать её везде где можно
Edited by Georgy Moshkin