Commit Graph

2890 Commits

Author SHA1 Message Date
Nikolay Degterinsky
a7f3c7086c
Merge pull request #41341 from evillique/mandatory-identification
Add a setting requiring no_password to be explicitly specified when creating a user
2022-09-22 15:19:43 +02:00
Nikita Mikhaylov
364aa1b41e
Fix race between ~BackgroundSchedulePool and ~DNSCacheUpdater (#41654) 2022-09-22 13:02:45 +02:00
Alexey Milovidov
45afacdae4
Merge pull request #41186 from ClickHouse/fix-three-fourth-of-trash
Fix more than half of the trash
2022-09-22 07:28:26 +03:00
Nikolay Degterinsky
7292d47923
Merge branch 'master' into mandatory-identification 2022-09-21 12:18:17 +02:00
Nikolay Degterinsky
f0ca365fa0 Better 2022-09-21 10:16:49 +00:00
Alexey Milovidov
2c69ec4317 Fix help message in static-files-disk-uploader 2022-09-21 05:14:31 +02:00
Alexey Milovidov
45bd3cfc30 Merge branch 'master' into fix-three-fourth-of-trash 2022-09-20 21:27:41 +02:00
Nikolai Kochetov
46c955a469
Merge pull request #41387 from ClickHouse/run-dns-cache-updater-earlier
Enable DNS cache updater earlier.
2022-09-20 12:04:05 +02:00
Antonio Andelic
22fe3b947e
Merge pull request #41520 from ClickHouse/fix-log-saving-for-stateless-tests
Add option for loading only system tables with clickhouse-local
2022-09-20 08:23:47 +02:00
Sergei Trifonov
cf2db48c29
Merge pull request #40631 from ClickHouse/readonly-settings-allow
Allow to modify constrained settings in readonly mode
2022-09-20 02:18:14 +02:00
Antonio Andelic
0f92e5e576 Add option for loading only system tables from path using clickhouse-local 2022-09-19 14:18:42 +00:00
Vitaly Baranov
052ecaa211
Merge branch 'master' into improve-recovery-of-replicated-access-storage 2022-09-19 15:26:21 +02:00
Sergei Trifonov
f7a1ed3141
Merge branch 'master' into readonly-settings-allow 2022-09-19 12:52:36 +02:00
Alexey Milovidov
bb6f1bfce2 Fix 9/10 of trash 2022-09-19 08:53:20 +02:00
Vitaly Baranov
5365b105cc Add SYSTEM RELOAD USERS command. 2022-09-18 12:44:00 +02:00
Alexey Milovidov
515972f459 Merge branch 'master' into forbid-dlopen-2 2022-09-18 02:20:22 +02:00
Alexey Milovidov
bac578b23a
Merge pull request #41428 from ClickHouse/remove-dlopen
Remove `dlopen`
2022-09-18 00:09:57 +03:00
Alexey Milovidov
d9d1b558e9 Fix clang-tidy 2022-09-17 18:40:22 +02:00
Alexey Milovidov
ada7a44ae4 Remove -WithTerminatingZero methods 2022-09-17 05:34:18 +02:00
Alexey Milovidov
ecd4c29c2a Forbid invocations of dlopen 2022-09-17 03:55:39 +02:00
Alexey Milovidov
35cce03125 Remove dlopen 2022-09-17 03:02:34 +02:00
Nikolai Kochetov
8422fd5791
Merge branch 'master' into run-dns-cache-updater-earlier 2022-09-16 20:48:51 +02:00
Dmitry Novik
eacc790050
Merge branch 'master' into fix-odr-vialation 2022-09-16 18:44:53 +02:00
Robert Schulze
b32b02d844
Merge pull request #40897 from ClickHouse/catboost-bridge-resurrected
Move CatBoost evaluation into clickhouse-library-bridge
2022-09-16 13:12:09 +02:00
Eugene Konkov
ce0508e223
Increase open files limit (#41345)
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2022-09-16 12:41:36 +02:00
Nikolai Kochetov
ee361c6d46 Enable DNS cache updater earlier. 2022-09-15 17:31:28 +00:00
Nikolay Degterinsky
72d8a04ee6 Add setting 'allow_implicit_no_password' 2022-09-15 08:07:42 +00:00
Robert Schulze
fd97058e45
fix: incorporate review comments 2022-09-14 15:21:24 +00:00
Dmitry Novik
990ce888bf
Merge branch 'master' into fix-odr-vialation 2022-09-13 16:53:57 +02:00
Sergei Trifonov
5ee2f1701c
Merge branch 'master' into kvm-clock 2022-09-13 12:45:24 +02:00
Sergei Trifonov
795c1c1438 fix warning text 2022-09-13 12:44:42 +02:00
Kseniia Sumarokova
b2c9c04c7b
Merge pull request #40821 from kssenii/improve-marks-cache-loading
Allow to load marks in threadpool in advance
2022-09-13 12:31:58 +02:00
Sergei Trifonov
85e43566b6
Merge branch 'master' into kvm-clock 2022-09-13 00:17:09 +02:00
Robert Schulze
fac1be9700
chore: restore SYSTEM RELOAD MODEL(S) and moniting view SYSTEM.MODELS
- 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.
2022-09-12 19:33:02 +00:00
Azat Khuzhin
b698a4ff65 Apply changes to http handlers on fly without server restart
This has been implemented by simply restarting http servers in case of
http_handlers directive in configuration xml had been changed.

But, for this I have to change the handlers interface to accept
configuration separatelly, since the configuration that contains in the
server is the configuration with which server had been started.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Co-authored-by: Antonio Andelic
2022-09-12 17:34:51 +02:00
Sergei Trifonov
fe88a7991d
Merge branch 'master' into readonly-settings-allow 2022-09-12 16:20:40 +02:00
Sergei Trifonov
2c78ff9697
Merge branch 'master' into kvm-clock 2022-09-12 14:59:18 +02:00
Sergei Trifonov
22ea533179 Do not warn about kvm-clock 2022-09-12 14:56:01 +02:00
kssenii
0bb6f8792a Fix 2022-09-12 14:06:26 +02:00
Alexey Milovidov
9a0892c40c
Merge pull request #41171 from ClickHouse/fix-half-of-trash
Fix half of trash
2022-09-11 21:40:22 +03:00
kssenii
b7d751b782 Merge remote-tracking branch 'upstream/master' into improve-marks-cache-loading 2022-09-11 13:23:30 +02:00
Alexey Milovidov
5802c2fdd2
Merge pull request #40713 from ClickHouse/remove-useless-line
Remove one line from XML, because we do not care
2022-09-11 09:53:30 +03:00
Alexey Milovidov
61278c81e4 Merge branch 'master' into remove-useless-line 2022-09-10 05:07:10 +02:00
Alexey Milovidov
fa62c7e982 Fix half of trash 2022-09-10 04:08:16 +02:00
Dmitry Novik
323fdeff0b
Merge branch 'master' into fix-odr-vialation 2022-09-09 00:42:14 +02:00
Dmitry Novik
29b5d023ee Replace WITH_TEXT_LOG by WITHOUT_TEXT_LOG 2022-09-08 19:16:37 +02:00
Robert Schulze
c16707ff00
chore: delete obsolete modelEvaluate() function + SYSTEM.MODELS view
- 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.
2022-09-08 09:10:11 +00:00
Robert Schulze
60f9f6855d
feat: implement catboost in library-bridge
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
2022-09-08 09:01:32 +00:00
Sergei Trifonov
77ee4c04aa fix stateless tests 2022-09-06 20:28:50 +02:00
kssenii
487bc0fba3 Fix heap use after free 2022-09-06 16:50:58 +02:00