The links at the very beginning of
https://clickhouse.com/docs/en/sql-reference/statements/system
don't work. They are reference other sections of the same document. This
is weird because there is a small index already on the right side. I
searched our documentation and this seems to be the only pages which do
so. Therefore removing the links altogether instead of fixing them.
- This commit restores statements "SYSTEM RELOAD MODEL(S)" which provide
a mechanism to update a model explicitly. It also saves potentially
unnecessary reloads of a model from disk after it's initial load.
To keep the complexity low, the semantics of "SYSTEM RELOAD MODEL(S)
was changed from eager to lazy. This means that both statements
previously immedately reloaded the specified/all models, whereas now
the statements only trigger an unload and the first call to
catboostEvaluate() does the actual load.
- Monitoring view SYSTEM.MODELS is also restored but with some obsolete
fields removed. The view was not documented in the past and for now it
remains undocumented. The commit is thus not considered a breach of
ClickHouse's public interface.
- The deleted function modelEvaluate() was superseded by
catboostEvaluate().
- Also delete the external model repository, as modelEvaluate() was it's
last user. Additionally remove the system view SYSTEM.MODELS for
inspecting the repository.
- SYSTEM RELOAD MODELS is also obsolete. HOWEVER, it was retained and
made a no-op instead of deleted.
Why?
The reason is that RBAC in distributed setups works by storing
privileges (granted and revoked) as plain SQL statements in Keeper.
Nodes read these statements at startup and parse them. If a privilege
for SYSTEM RELOAD MODELS exists but parser doesn't recognize it
nodes would fail to come up.
Considered but rejected alternatives:
- Ignore SYSTEM RELOAD MODELS during parsing RBAC privileges and
return an error for regular SYSTEM RELOAD MODELS SQL. Special-case
of no-op behavior, too brittle.
- Remove SYSTEM RELOAD MODELS manually from Keeper via command-line
manipulation of Keeper nodes or via SQL by dropping the privileges.
Needs user intervention during upgrade.
* DOCSUP-2806: Add meta intro.
* DOCSUP-2806: Update meta intro.
* DOCSUP-2806: Fix meta.
* DOCSUP-2806: Add quotes for meta headers.
* DOCSUP-2806: Remove quotes from meta headers.
* DOCSUP-2806: Add meta headers.
* DOCSUP-2806: Fix quotes in meta headers.
* DOCSUP-2806: Update meta headers.
* DOCSUP-2806: Fix link to nowhere in EN.
* DOCSUP-2806: Fix link (settings to tune)
* DOCSUP-2806: Fix links.
* DOCSUP-2806:Fix links EN
* DOCSUP-2806: Fix build errors.
* DOCSUP-2806: Fix meta intro.
* DOCSUP-2806: Fix toc_priority in examples datasets TOC.
* DOCSUP-2806: Fix items order in toc.
* DOCSUP-2806: Fix order in toc.
* DOCSUP-2806: Fix toc order.
* DOCSUP-2806: Fix order in toc.
* DOCSUP-2806: Fix toc index in create
* DOCSUP-2806: Fix toc order in create.
Co-authored-by: romanzhukov <romanzhukov@yandex-team.ru>
Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
After this patch SYSTEM FLUSH LOGS will force system.*_log table
creatoins (only for enabled tables of course).
This will avoid such hacks like:
set log_queries=1;
select 1;
system flush logs;
This is the second version of the patch, since first has a deadlock [1]
(reported by @alesapin). This version does not use separate lock and do
not issue CREATE TABLE from the query execution thread, instead it
activate flushing thread to do so, hence this should be the same as if
the table will be created during flush.
[1]: https://gist.github.com/alesapin/d915d1deaa27d49aa31223daded02be2Fixes: #11563
Cc: @alesapin
Cc: @nikitamikhaylov