Commits
- Commit:
f2cbc886970451628b335b9b8216be25a0e54c3a
- From:
- Olga Arkhangelskaia <arkholga@tarantool.org>
- Date:
ctl: added functionality to detect and prune dead replicas
After restart of replicaset or after some configuration changes
replicaset may suffer from littering the system space by "dead" replicas.
To detect and throw away such replica replicaset_list_inactive(),
replica_prune(), replicaset_purge() are introduced.
replicaset_list_inactive() returns uuid table of dead replicas
replica_prune(uuid) throws away replica with given id from system space
replicaset_purge([uuid]) throws away table of dead replicas, that is
provided by admin or by replicaset_list_inactive().
Closes #3110
@TarantoolBot document
Title: Introduce replicaset_list_inactive(), replica_prune(uuid),
replicaset_purge([uuid])
After some changes in replicaset (restart, configuration change) replicaset may suffer
from leftovers or previous configurations: empty replicas with uuid, but
without any read/write activity. To delete such trash from system the space space,
replicaset_list_inactive(), replica_prune(), replicaset_purge() are introduced.
replicaset_list_inactive() lists uuid table of such "zombie" replicas.
replica_prune(uuid) throws away replica with given id from system space
replicaset_purge([uuid]) throws away table of dead replicas, that is
provided by admin or by replicaset_list_inactive().
- Commit:
e5834e43350becf3186a0428bec07535a44111de
- From:
- Kirill Yukhin <kyukhin@tarantool.org>
- Via:
- Vladimir Davydov <vdavydov.dev@gmail.com>
- Date:
sql: check read access while executing SQL query
Since SQL front-end is not using box API,
no checkes for read access are performed by VDBE engine.
Add check to IteratorOpen op-code to make sure that read
privilege exists for given space.
Note, that there's is no need to perform DML/DDL checkes as
they're performed by Tarantool's core.
@TarantoolBot document
Title: Document behaviour of SQL in presence of
read access restrictions. Need to clarify, that
if there's no read access to the space, then not
only SELECT statements will fail, but also those DML
which implies reading from spaces indirectly, e.g.:
UPDATE t1 SET a=2 WHERE b=3;
Closes #2362
- Commit:
5b7cc2945717570c6bf0a13e6207303e798dc30b
- From:
- Kirill Yukhin <kyukhin@tarantool.org>
- Via:
- Vladimir Davydov <vdavydov.dev@gmail.com>
- Date:
sql: use space_by_name in SQL
Since hash, which maps space name to space pointer was introduced in
previous patch, use it in SQL front-end as it is heavily needed.
@locker: removed a couple of useless assertions and variable renames
- Commit:
030d28f55fa855a7cd967078e61a55aced523e30
- From:
- Kirill Yukhin <kyukhin@tarantool.org>
- Via:
- Vladimir Davydov <vdavydov.dev@gmail.com>
- Date:
schema: add space name cache
Since SQL is heavily using name -> space mapping, introduce (instead of
scanning _space space) dedicated cache, which maps space name to space
pointer.
@locker: code cleanup
- Commit:
d792fd2664cdbf87237253f96c96d94e833e822c
- From:
- Vladimir Davydov <vdavydov.dev@gmail.com>
- Date:
alter: install space commit/rollback triggers before preparing sql view
sql_compile_view() may fail, in which case the space will never be
deleted from (in case of space creation) or inserted back into (in case
of space drop) the space cache, because commit/rollback triggers, which
are supposed to do the job, are only installed after preparing a view.
Fix this by installing triggers before sql_compile_view().
No need to write a test as without this commit sql/view test will
crash after applying the next commit (the one that introduces space
name cache).
Fixes commit dc358cb01428 ("sql: rework VIEW internals").