Commit Graph

2909 Commits

Author SHA1 Message Date
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
Sergei Trifonov
6217559175
Merge branch 'master' into readonly-settings-allow 2022-09-06 16:10:48 +02:00
Alexey Milovidov
51dc796275 Remove trash 2022-09-06 02:04:57 +02:00
Alexey Milovidov
b7bdd38e41 Revert "Remove trash"
This reverts commit 494dfff73c.
2022-09-06 02:04:36 +02:00
Alexey Milovidov
494dfff73c Remove trash 2022-09-06 02:04:18 +02:00
Alexey Milovidov
940a53e519
Merge pull request #40984 from Lucky-Chang/typo_fix
Fix some typos and clang-tidy warnings
2022-09-06 02:37:50 +03:00
Kruglov Pavel
95847775b6
Merge pull request #40120 from evillique/obfuscator-schema-inference
Add schema inference to `clickhouse-obfuscator`
2022-09-05 22:03:57 +02:00
kssenii
0f305f8a7a Fix test 2022-09-05 12:20:21 +02:00
Luck-Chang
1ac8e739c9 fix some typos and clang-tidy warnings 2022-09-05 09:50:24 +08:00
Alexey Milovidov
0e5c94ce80 Merge branch 'master' into add-missing-tests-geobase 2022-09-04 03:32:29 +02:00
Alexey Milovidov
13a129bee7 Merge branch 'master' into remove-useless-line 2022-09-04 03:24:40 +02:00
Alexander Gololobov
90baf74f13 Added mkdir command 2022-09-02 19:30:35 +02:00
kssenii
2dcf3fef94 Fix tests 2022-09-02 19:27:52 +02:00
Sergei Trifonov
005b2588d8
Merge branch 'master' into readonly-settings-allow 2022-09-02 16:37:43 +02:00
Sergei Trifonov
014d109175 fix build, fix docs, fix comments, logical fixes, test are still to be fixed and new test are to be added 2022-09-02 16:20:09 +02:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
Sergei Trifonov
7fec55eea4 work in progress 2022-09-02 04:12:05 +02:00
Nikolay Degterinsky
e9232fc4e6 Better 2022-09-01 20:19:25 +00:00
Nikolay Degterinsky
5a611e272a Merge remote-tracking branch 'upstream/master' into obfuscator-schema-inference 2022-09-01 13:07:28 +00:00
Sema Checherinda
7b59fdc042
Merge pull request #40779 from CheSema/detached-parts-metric
Metric for the number of detached parts
2022-09-01 12:24:42 +02:00
root
d5db88fa27 Structured-logging-custom-keys PR init 2022-08-30 23:20:19 -03:00
Sema Checherinda
e436b4f4cc Metric for the number of detached parts 2022-08-30 02:12:57 +02:00
Alexander Tokmakov
1c6dea52e0
Update config.xml 2022-08-29 15:50:05 +03:00
Alexey Milovidov
84f9432e7e
Merge pull request #40724 from azat/update-bash-completion
Update available formats for bash completion
2022-08-29 00:14:48 +03:00
Alexey Milovidov
f462160bd1 Merge remote-tracking branch 'origin/master' into remove-useless-line 2022-08-28 21:00:29 +02:00
Alexey Milovidov
2fa8d212e6 Fix very strange test 2022-08-28 21:00:15 +02:00
Alexey Milovidov
deac6cfb5d Minor modifications 2022-08-28 20:49:39 +02:00
Azat Khuzhin
29877d3992 Update available formats for bash completion
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-28 17:22:32 +02:00
Alexey Milovidov
ddff5e9145
Merge pull request #40712 from ClickHouse/ci-cmake-self-extractable
cmake: Disable default ENABLE_CLICKHOUSE_SELF_EXTRACTING
2022-08-28 17:12:19 +03:00
Alexey Milovidov
b42d26acfe Remove one line from XML, because we do not care 2022-08-28 02:44:02 +02:00
Alexey Milovidov
632867dbff Fix error 2022-08-28 02:40:43 +02:00
Alexey Milovidov
3139d4a79a Fix error 2022-08-28 02:38:46 +02:00
Yakov Olkhovskiy
31a7ed09a1 disable default ENABLE_CLICKHOUSE_SELF_EXTRACTING and add to env 2022-08-27 21:08:01 +00:00
Alexey Milovidov
b14bd43590 Fix error 2022-08-27 20:25:06 +02:00
Alexey Milovidov
b70373d429 Fix error 2022-08-27 20:23:15 +02:00
Alexey Milovidov
6414a01987 Rewrite NLP tests from integration to functional 2022-08-26 22:36:34 +02:00
Alexey Milovidov
77e15a24d0 Add missing tests for legacy geobase 2022-08-26 22:17:49 +02:00
Alexey Milovidov
34b5d267f3
Merge pull request #40461 from ClickHouse/dashboard
Dashboard
2022-08-23 15:34:28 +03:00
Alexey Milovidov
0252695c6e
Merge pull request #40224 from ClickHouse/alexey-milovidov-patch-4
Check what will be if I enable `concurrency-mt-unsafe` in `clang-tidy`
2022-08-22 23:12:01 +03:00
Alexey Milovidov
6444afac52 Merge branch 'master' into dashboard 2022-08-22 01:30:21 +02:00
Robert Schulze
e8b3f56733
Limit suppression to a specific warning 2022-08-21 18:24:17 +00:00
Alexey Milovidov
000f879779 Add comments 2022-08-21 13:31:04 +02:00
Alexey Milovidov
861e5dbb76 Add comments 2022-08-21 13:26:32 +02:00
Alexey Milovidov
ab079b270a Add comments 2022-08-21 13:07:46 +02:00
Alexey Milovidov
fa9df87198 Fix margin 2022-08-21 12:56:23 +02:00
Alexey Milovidov
458d21dd3c Add "readpassphrase" as a dependency for clickhouse-local 2022-08-21 12:12:11 +02:00
Alexey Milovidov
9635fa817b Embedded dashboard 2022-08-21 12:11:25 +02:00
Alexey Milovidov
4e0bf0dd34 Add a file 2022-08-21 12:11:04 +02:00
Alexey Milovidov
3649aac593 Fix style 2022-08-20 17:59:51 +02:00
Alexey Milovidov
74e1f4dc61 Fix clang-tidy 2022-08-20 17:09:20 +02:00
Sergei Trifonov
7bbbe0a4db fix darwin build 2022-08-18 19:31:25 +02:00
Sergei Trifonov
b064021cec fix build 2022-08-18 16:57:31 +02:00
Sergei Trifonov
42a711015f split concurrent_threads_soft_limit setting into two: concurrent_threads_soft_limit_{num,ratio_to_cores} 2022-08-18 14:51:08 +02:00
Nikita Mikhaylov
a7c3f23dfb
Merge branch 'master' into auto_convert_ordinary_to_atomic 2022-08-17 00:38:25 +02:00
Alexander Tokmakov
c9bb91c31f
Merge pull request #40232 from ClickHouse/fix_a_bug_with_symlinks_detection
Fix a bug with symlinks detection
2022-08-15 20:28:30 +03:00
Alexander Tokmakov
6f5a7c3bf7 fix a bug with symlinks detection 2022-08-15 12:30:47 +02:00
Alexey Milovidov
bada9ebefa
Merge branch 'master' into disable-zero-copy-replication 2022-08-14 10:40:16 +03:00
Alexey Milovidov
e774d28c43 Fix style 2022-08-14 04:16:48 +02:00
Alexey Milovidov
53ce2986de Display server-side time in clickhouse-benchmark by default 2022-08-14 03:33:42 +02:00
Alexey Milovidov
f0c8998471 Add warning message 2022-08-14 01:49:00 +02:00
Alexey Milovidov
42c358aa3c Add warning message 2022-08-14 01:47:36 +02:00
Kseniia Sumarokova
a6cfc7bc3b
Merge pull request #34651 from alexX512/master
New caching strategies
2022-08-12 17:23:37 +02:00
Nikita Taranov
17956cb668
Extend protocol with query parameters (#39906) 2022-08-12 14:28:35 +02:00
Nikolay Degterinsky
644be9dc42 Remove unneded ReadBuffers 2022-08-11 13:27:09 +00:00
Nikolay Degterinsky
1b8ca90fcc Add schema inference to clickhouse-obfuscator 2022-08-11 11:32:32 +00:00
Nikolay Degterinsky
496568101f
Merge pull request #39277 from ClibMouse/Structured-Logging-Support
Structured logging support
2022-08-10 22:57:48 +02:00
Kseniia Sumarokova
a4d513657c
Merge pull request #40010 from ClickHouse/catboost-further-preparation
Further preparation for catboost integration into library-bridge
2022-08-10 17:35:12 +02:00
Vladimir C
eb1ac41ac5
Merge pull request #40053 from ClickHouse/play-tab-in-textarea
Play: recognize tab in textarea
2022-08-10 12:53:28 +02:00
Robert Schulze
810221baf2
Assume unversioned server has version=0 and use tryParse() instead of from_chars() 2022-08-10 07:39:32 +00:00
Alexey Milovidov
34c8d2c3b4 Play: recognize tab in textarea 2022-08-10 08:33:58 +02:00
Mallik Hassan
666fb8dc42
Merge branch 'ClickHouse:master' into Structured-Logging-Support 2022-08-09 15:39:00 -03:00
Robert Schulze
e0d5020a92
Add simple versioning to the *-bridge-to-server protocol
- In general, it is expected that clickhouse-*-bridges and
  clickhouse-server were build from the same source version (e.g. are
  upgraded "atomically"). If that is not the case, we should at least
  be able to detect the mismatch and abort.

- This commit adds a URL parameter "version", defined in a header shared
  by the server and bridges. The bridge returns an error in case of
  mismatch.

- The version is *not* send and checked for "ping" requests (used for
  handshake), only for regular requests send after handshake. This is
  because the internally thrown server-side exception due to HTTP
  failure does not propagate the exact HTTP error (it only stores the
  error as text), and as a result, the server-side handshake code
  simply retries in case of error with exponential backoff and finally
  fails with a "timeout error". This is reasonable as pings typically
  fail due to time out. However, without a rework of HTTP exceptions,
  version mismatch during ping would also appear as "timeout" which is
  too misleading. The behavior may be changed later if needed.

- Note that introducing a version parameter does not represent a
  protocol upgrade itself. Bridges older than the server will simply
  ignore the field. Only servers older than the bridges receive an error
  but such a situation should never occur in practice.
2022-08-08 19:40:37 +00:00
Robert Schulze
9952ab1099
Prefix class names "LibraryBridge*Handler" with "ExternalDictionary"
- necessary to disambiguate the names from "CatBoost"-"LibraryBridgeHandler"
  which will be added in a next step
2022-08-08 17:16:46 +00:00
Yakov Olkhovskiy
d39e9f65de
Merge branch 'master' into fix-quota-key 2022-08-08 11:54:21 -04:00
Robert Schulze
ad0d060dc1
Merge pull request #39904 from ClickHouse/library-bridge-refactoring
Prepare library-bridge for catboost integration
2022-08-08 12:15:01 +02:00
Alexey Milovidov
64a1b0f2b8 Play UI: row numbers; cell selection; hysteresis 2022-08-08 04:25:03 +02:00
Alexey Milovidov
653b86d1e6 Play UI: row numbers; cell selection; hysteresis 2022-08-08 04:16:50 +02:00
Alexey Milovidov
2d83635643 Play UI: row numbers; cell selection; hysteresis 2022-08-08 03:57:02 +02:00
Alexey Milovidov
d914ddc766 Fix Play UI 2022-08-08 02:36:50 +02:00
alexX512
2be72560f4 Add loading of mark cache policy 2022-08-07 19:59:39 +00:00
alexX512
1133e42367 Add CacheBase clas instead of LRUCache and SLRUCache fo simpler configuration oache policiesf 2022-08-07 19:16:40 +00:00
Yakov Olkhovskiy
29622746ea
Merge pull request #39936 from ClickHouse/cmake-fix-self-extracting-split
Don't create self-extracting clickhouse for split build
2022-08-07 07:23:24 -04:00
Yakov Olkhovskiy
b1f45fa787 Don't create self-extracting clickhouse for split build 2022-08-05 21:48:40 -04:00
Alexey Milovidov
ac93f0a2ca
Merge pull request #39910 from santrancisco/enhance-playui-authentication
Move username and password from URL parameters to Basic Authentication
2022-08-06 01:58:09 +03:00
Alexander Tokmakov
f2c4cad255 add flag that enables automatic canversion from Ordinary to Atomic 2022-08-05 21:41:25 +02:00
santrancisco
c7f0598a6f Fall back to url parameters if file is opened locally 2022-08-05 13:10:45 +10:00