Commit Graph

21146 Commits

Author SHA1 Message Date
Antonio Andelic
222b964070
Merge pull request #38200 from ClickHouse/keeper-linearizable-reads
Keeper faster linearizable reads
2022-09-16 07:58:52 +02:00
Alexey Milovidov
da01982652
Merge pull request #41046 from azat/build/llvm-15
Switch to llvm/clang 15
2022-09-16 07:31:06 +03:00
Raúl Marín
c3ff66bd9d
Implement batch processing for aggregate functions with multiple nullable arguments (#41058)
* Implement batch processing for aggregate functions with multiple nullable arguments

* Fix broken perf test

* Improve filter handling in addBatchSinglePlace with nullable arguments

* Fix detecting the Null filter usage
2022-09-15 23:51:38 +02:00
Raúl Marín
6dac509739
Speed up reading uniqState (#41089)
* Speed up reading UniquesHashSet

* Improve uniq serialization tests
2022-09-15 23:41:15 +02:00
Denny Crane
dccfdb0d52
Update 02374_combine_multi_if_and_count_if_opt.sql 2022-09-15 16:25:15 -03:00
Alexander Tokmakov
03c193ccca fix ON CLUSTER with Replicated database cluster 2022-09-15 21:15:57 +02:00
Denny Crane
e1d263c000 fix 02374_combine_multi_if_and_count_if_opt test 2022-09-15 15:51:31 -03:00
Denny Crane
7cfdfbe787 disable optimize_rewrite_sum_if_to_count_if by default 2022-09-15 15:30:24 -03:00
avogar
ef7f7b30aa Fix tests 2022-09-15 18:20:17 +00:00
Antonio Andelic
fe78c063f6
Merge branch 'master' into keeper-linearizable-reads 2022-09-15 18:40:23 +02:00
Raúl Marín
fb034de032 Check the behaviour of query_log read/write stats in INSERT queries 2022-09-15 18:31:53 +02:00
Antonio Andelic
0dbd0c1f72 Merge branch 'master' into keeper-linearizable-reads 2022-09-15 16:03:18 +00:00
Anton Popov
edc2c79dbc add a test just in case 2022-09-15 15:29:47 +00:00
alesapin
1dd50e3ce8 Rename test 2022-09-15 17:07:42 +02:00
Mikhail f. Shiryaev
fac1bf224e
Merge pull request #41328 from ClickHouse/ccache-backports
Download ccache from release PRs for backports
2022-09-15 16:55:42 +02:00
Roman Vasin
5c242de43a Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-528-B 2022-09-15 13:47:51 +00:00
Roman Vasin
d09b3c1ffd Rename test 02403_enable_date32_results to 02403_enable_extended_results_for_datetime_functions 2022-09-15 13:36:18 +00:00
Roman Vasin
563449779c Replace enable_date32_results by enable_extended_results_for_datetime_functions 2022-09-15 12:48:09 +00:00
serxa
0d1ef863fa fix stateless tests 2022-09-15 11:48:15 +00:00
Denny Crane
1b8b2ebed5
Disable optimize_monotonous_functions_in_order_by by default (#41136)
* #40094 disable optimize_monotonous_functions_in_order_by by default

* fix 01576_alias_column_rewrite test

* fix incorrect 02149_read_in_order_fixed_prefix.sql test

* Update 02149_read_in_order_fixed_prefix.sql
2022-09-15 13:41:46 +02:00
serxa
a960fdea89 Merge branch 'readonly-settings-allow' of github.com:ClickHouse/ClickHouse into readonly-settings-allow 2022-09-15 11:38:06 +00:00
serxa
4971c1f04d review fixes 2022-09-15 11:34:14 +00:00
Robert Schulze
cce4ed5496
Un-exclude constant_column_search from ARM perf tests
constant_column_search was excluced when ARM perf tests were set up
PR 37497. Back then we haven't had PR 41033 and regexp eval on ARM was
slow. Let's check again.
2022-09-15 10:48:47 +00:00
Kseniia Sumarokova
69f38a6228
Merge pull request #41330 from kssenii/fix-composable-cache-setting-incompatibility
Fix incompatibility of cache after switching setting `do_no_evict_...` from 1 to 0, 0 to 1
2022-09-15 12:00:22 +02:00
Kruglov Pavel
73cf72a5a4
Merge pull request #41309 from Avogar/fix-msgpack
Add column type check before UUID insertion in MsgPack format
2022-09-15 11:37:57 +02:00
Robert Schulze
b64af5989e
Merge branch 'master' into opentelemetry_stress 2022-09-15 09:43:11 +02:00
Anton Popov
66667737f0 fix writing of empty columns of type Object 2022-09-15 03:38:22 +00:00
kssenii
559c696230 Fix 2022-09-14 20:35:28 +02:00
avogar
f1a0501eb2 Fix memory leaks and segfaults in combinators 2022-09-14 18:01:49 +00:00
Mikhail f. Shiryaev
c2b02c2ae9
Download ccache from release PRs for backports 2022-09-14 18:24:55 +02:00
Anton Popov
3623807527
Merge pull request #41290 from CurtizJ/dynamic-columns-20
Fix `ALTER ADD COLUMN`  with columns of type `Object`
2022-09-14 14:15:29 +02:00
mateng0915
372a0b7794 added events into s3 integration test 2022-09-14 19:19:47 +08:00
avogar
59e7eb084c Add column type check before UUID insertion in MsgPack format 2022-09-14 11:15:10 +00:00
Kruglov Pavel
3396ff6c3a
Merge pull request #40516 from zjial/record_errors_for_import_by_csv
Record errors while reading text formats (CSV, TSV).
2022-09-14 12:52:32 +02:00
alesapin
51a302a70f
Merge branch 'master' into revert-40968-s3-sharding-2 2022-09-14 11:53:14 +02:00
vdimir
7fd0369c0f
Mark 02421_exponential_join_rewrite long 2022-09-14 09:18:07 +00:00
Frank Chen
569167d9aa Improve the test to address review comments
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-14 11:43:23 +08:00
Anton Popov
ee54451741 fix adding of columns of type Object 2022-09-13 22:43:59 +00:00
Robert Schulze
e8e6dddc76
Merge pull request #41034 from FrankChen021/distributed
Improve the observability of INSERT on distributed table
2022-09-13 20:55:11 +02:00
Nikolai Kochetov
66d9d92de4 Fix wrong literal name in KeyCondition using ActionsDAG. 2022-09-13 18:47:29 +00:00
Vladimir C
f0e4088c84
Merge pull request #41154 from azat/fix-sorted-block-writer 2022-09-13 19:14:45 +02:00
Antonio Andelic
36f46891dd
Merge pull request #41215 from ClickHouse/keeper-close-connection-on-shutdown
Close sessions on Keeper shutdown
2022-09-13 19:09:34 +02:00
Dmitry Novik
7e3fb0a681
Merge pull request #40762 from ClickHouse/grouping-comp
Fix GROUPING function SQL compatibility
2022-09-13 17:03:06 +02:00
Frank Chen
f8dcf01aa6 Fix shellcheck
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 21:04:39 +08:00
Kruglov Pavel
faa62f96ae
Merge branch 'master' into new-json-formats 2022-09-13 14:41:13 +02:00
Kruglov Pavel
17621b5607
Merge branch 'master' into fix-totals-extremes 2022-09-13 14:36:31 +02:00
Antonio Andelic
baf7255cff
Merge pull request #39976 from ClickHouse/keeper-storage
KeeperMap storage engine
2022-09-13 14:15:09 +02:00
Alexander Tokmakov
4d146b05a9
Merge pull request #38262 from PolyProgrammist/fix-ordinary-system-unfreeze
Fix SYSTEM UNFREEZE for ordinary database
2022-09-13 14:55:11 +03:00
Alexander Tokmakov
54001d3871
Revert "Fix uncaught DNS_ERROR on failed connection to replicas" 2022-09-13 13:51:09 +03:00
Kruglov Pavel
1bb53324b7
Merge pull request #41213 from azat/tests/fix-01051_system_stack_trace
test: fix 01051_system_stack_trace flakiness
2022-09-13 12:49:28 +02:00
Kruglov Pavel
b80eb57153
Don't run test in fasttest 2022-09-13 12:40:36 +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
alesapin
9af591a328
Revert "Sharding s3 key names (2)" 2022-09-13 12:29:02 +02:00
Frank Chen
0c37c95c22 Add test cases
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 18:28:36 +08:00
Antonio Andelic
45cde90219 Fix test 2022-09-13 09:51:31 +00:00
Vladimir C
97723fb312
Set max_analyze_depth in 02337_join_analyze_stuck 2022-09-13 10:27:22 +02:00
Robert Schulze
7a46b862a6
fix: skip SYSTEM.MODELS In test 01161_all_system_tables.sh
The test is a stress test which queries all system tables in parallel.
System table SYSTEM.MODELS is now populated using the library-bridge.
This made the test fail with error:

   2022-09-12 23:51:34 Code: 410. DB::Exception: Received from localhost:9000. DB::Exception: BridgeHelper: clickhouse-library-bridge is not responding. (EXTERNAL_SERVER_IS_NOT_RESPONDING)
   2022-09-12 23:51:34 (query: SELECT * FROM system.models LIMIT 10000 FORMAT Null)

Looking at the logs, the server tried to start the library-bridge when
querying SYSTEM.MODELS but multiple handshake attempts failed.

So (most likely) the infrastructure is slow or (unlikely) there are
settings in CI (e.g. a firewall) preventing communication with the
bridge. Because 1. other system tables are also excluded (zookeeper,
merge_tree_metadata_cache), 2. SYSTEM.MODELS is tested in integration
test "test_catboost_evaluate" and 3. the test runs locally just fine, I
am excluding SYSTEM.MODELS from it.
2022-09-13 08:22:41 +00:00
zhenjial
16c8cd0bd3 wait write finish 2022-09-13 14:19:40 +08:00
zhenjial
456f8a0e62 fix test permission 2022-09-13 10:25:52 +08:00
Denny Crane
be5cb480ab fix test CUR_DIR 2022-09-12 21:36:01 -03:00
Denny Crane
f02ea287ef fix test to support tz 2022-09-12 20:19:34 -03:00
Sergei Trifonov
9cd78585c3 fix tests 2022-09-13 00:12:40 +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
Kruglov Pavel
060adfbe93
Merge branch 'master' into new-json-formats 2022-09-12 19:37:46 +02:00
avogar
8ac2fc7b26 Don't outout totals/extremes in all row formats, update docs 2022-09-12 17:21:40 +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
vdimir
ba506043ce
Fix exponential query rewrite in case of lots of cross joins with where 2022-09-12 15:05:34 +00:00
Antonio Andelic
deee0d639f Address PR comments 2022-09-12 14:43:52 +00:00
Alexey Milovidov
2aedd41023
Remove strange code (#40195)
* Remove strange code

* Even more code removal

* Fix style

* Remove even more code

* Simplify code by making it slower

* Attempt to do something

* Attempt to do something

* Well do something with this horrible trash

* Add a test
2022-09-12 16:29:23 +02:00
Sergei Trifonov
fe88a7991d
Merge branch 'master' into readonly-settings-allow 2022-09-12 16:20:40 +02:00
Frank Chen
ebaa24ecae Fix flaky tests
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-12 22:15:30 +08:00
Antonio Andelic
1cd43d8e5c Merge branch 'master' into keeper-storage 2022-09-12 13:42:51 +00:00
Dmitry Novik
c236706703
Merge branch 'master' into grouping-comp 2022-09-12 15:19:51 +02:00
Antonio Andelic
e985ee3354 Close sessions on Keeper shutdown 2022-09-12 12:22:48 +00:00
Azat Khuzhin
ae23db6e8e test: fix 01051_system_stack_trace flakiness
Before test failed if clickhouse-server timed out while obtaining stack
trace for the first thread from the list, fix this by getting first
row with non empty trace.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-12 14:00:29 +02:00
Kseniia Sumarokova
df22e8d30c
Merge pull request #41190 from kssenii/fix-clean-up-thread
Fix cleaning up broken detached part after timeout
2022-09-12 13:21:45 +02:00
Robert Schulze
2d9f82c6e4
Merge pull request #41084 from ClickHouse/faaaasttest
Exclude slow tests from fasttest profile
2022-09-12 13:15:36 +02:00
kssenii
88b589917c Update defaults 2022-09-12 12:48:47 +02:00
Kseniia Sumarokova
d0c058f273
Merge pull request #41132 from Algunenano/views_log_window
Fix query_views_log with Window views
2022-09-12 11:56:22 +02:00
Kseniia Sumarokova
8587fa59f7
Merge pull request #41137 from ClickHouse/tavplubix-patch-3
Enable 01172_transaction_counters with S3
2022-09-12 11:54:46 +02:00
Frank Chen
16975ff4a8 Fix testcase
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-12 14:18:21 +08:00
Alexey Milovidov
9c5f9f1815
Merge pull request #41158 from den-crane/bug/trivial_count_optimization_with_array_join
Fix: trivial count optimization with array join. revert revert #39466
2022-09-12 08:56:10 +03:00
Frank Chen
27b6a25473 Compare content instead of count for easier problem solving
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-12 11:04:30 +08:00
Alexey Milovidov
94d6e9ce7d
Merge pull request #41189 from kssenii/fix-positional-args
Fix for positional arguments
2022-09-12 03:21:39 +03:00
Alexey Milovidov
8b5328f7e5 Merge branch 'master' into fix-trash-base58 2022-09-11 20:43:54 +02:00
Alexey Milovidov
db84711811
Update 02006_test_positional_arguments.reference 2022-09-11 21:37:40 +03:00
Alexey Milovidov
3a242d13df
Update 02006_test_positional_arguments.sql 2022-09-11 21:36:57 +03:00
Denny Crane
0e4e868f29
Merge branch 'master' into bug/trivial_count_optimization_with_array_join 2022-09-11 15:23:10 -03:00
kssenii
02c3d8b0a0 Fix 2022-09-11 16:42:56 +02:00
Kseniia Sumarokova
77ece00f9f
Merge branch 'master' into tavplubix-patch-3 2022-09-11 15:28:42 +02:00
Azat Khuzhin
13f7a82a5b
tests: fix 01281_group_by_limit_memory_tracking flakiness (#41178)
* tests: fix 01281_group_by_limit_memory_tracking flakiness

CI: https://s3.amazonaws.com/clickhouse-test-reports/41092/14d8f297d73f9f813c447474310fbfa0c5b18a0f/stateless_tests__debug__[2/3].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* tests: add missing bits into 01281_group_by_limit_memory_tracking

While rewriting the test in #11119 it looses LIMIT, which makes the test
useless, see details in #11022

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-11 13:57:36 +02:00
kssenii
2f3bfc5411 Fix 2022-09-11 13:54:25 +02: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
a5388affb8
Merge pull request #41023 from ClickHouse/remove-trash-3
Remove trash from config
2022-09-11 09:52:45 +03:00
Alexey Milovidov
3d8a2130cf Continue fixing the trash 2022-09-11 06:31:15 +02:00
Alexey Milovidov
91338ea771
Merge branch 'master' into remove-useless-line 2022-09-11 02:03:39 +03:00
Igor Nikonov
d947ab6aee
Merge pull request #41143 from ClickHouse/fix_int8_test_standalone_keeper_mode
Fix: integration test, standalone keeper mode
2022-09-10 23:17:39 +02:00
Azat Khuzhin
46eafb4732 tests: skip test_send_crash_reports under ASan
Since it also does not fits into timeouts [1]:

    2022-09-08 21:16:20 [ 377 ] DEBUG : Command:['docker', 'exec', '-u', 'root', 'roottestsendcrashreports_node_1', 'bash', '-c', 'pkill -SEGV clickhouse'] (cluster.py:95, run_and_check)
    ...
    2022-09-08 21:16:22 [ 377 ] DEBUG : run container_id:roottestsendcrashreports_node_1 detach:False nothrow:False cmd: ['cat', '/result.txt'] (cluster.py:1744, exec_in_container)
    ...
    2022-09-08 21:16:36 [ 377 ] DEBUG : Stdout:INITIAL_STATE (cluster.py:103, run_and_check)

And server logs:

    2022.09.08 21:16:21.112076 [ 228 ] {} <Fatal> BaseDaemon: ########################################
    2022.09.08 21:16:21.112170 [ 228 ] {} <Fatal> BaseDaemon: (version 22.9.1.1, build id: 0F7336E0A4D64134C51C8365DADCB78A9B39AA3B) (from thread 1) (no query) Received signal Segmentation fault (11)
    2022.09.08 21:16:21.112244 [ 228 ] {} <Fatal> BaseDaemon: Address: 0xde Access: read. Unknown si_code.
    2022.09.08 21:16:21.112321 [ 228 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fbe21d09376 0x40a4f71a 0xe293a4b 0xdc5c51a 0x38dee227 0xdc326a0 0x38e319d9 0xdc2b4e2 0xdc25fdb 0x7fbe21b2c083 0xdb636ae
    2022.09.08 21:16:21.112419 [ 228 ] {} <Fatal> BaseDaemon: 3. pthread_cond_wait @ 0x7fbe21d09376 in ?
    2022.09.08 21:16:21.122914 [ 228 ] {} <Fatal> BaseDaemon: 4. ./build_docker/../contrib/libcxx/src/condition_variable.cpp:0: std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) @ 0x40a4f71a in /usr/bin/clickhouse
    2022.09.08 21:16:21.233016 [ 228 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./build_docker/../contrib/libcxx/include/atomic:952: unsigned long std::__1::__cxx_atomic_load<unsigned long>(std::__1::__cxx_atomic_base_impl<unsigned long> const*, std::__1::memory_order)
    2022.09.08 21:16:21.233135 [ 228 ] {} <Fatal> BaseDaemon: 5.2. inlined from ../contrib/libcxx/include/atomic:1582: std::__1::__atomic_base<unsigned long, false>::load(std::__1::memory_order) const
    2022.09.08 21:16:21.233183 [ 228 ] {} <Fatal> BaseDaemon: 5.3. inlined from ../contrib/libcxx/include/atomic:1586: std::__1::__atomic_base<unsigned long, false>::operator unsigned long() const
    2022.09.08 21:16:21.233234 [ 228 ] {} <Fatal> BaseDaemon: 5.4. inlined from ../src/Daemon/BaseDaemon.cpp:967: operator()
    2022.09.08 21:16:21.233303 [ 228 ] {} <Fatal> BaseDaemon: 5.5. inlined from ../contrib/libcxx/include/__mutex_base:402: void std::__1::condition_variable::wait<BaseDaemon::waitForTerminationRequest()::$_0>(std::__1::unique_lock<std::__1::mutex>&, BaseDaemon::waitForTerminationRequest()::$_0)
    2022.09.08 21:16:21.233334 [ 228 ] {} <Fatal> BaseDaemon: 5. ../src/Daemon/BaseDaemon.cpp:967: BaseDaemon::waitForTerminationRequest() @ 0xe293a4b in /usr/bin/clickhouse
    2022.09.08 21:16:21.350675 [ 228 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../programs/server/Server.cpp:0: DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xdc5c51a in /usr/bin/clickhouse
    2022.09.08 21:16:21.394092 [ 228 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../contrib/poco/Util/src/Application.cpp:0: Poco::Util::Application::run() @ 0x38dee227 in /usr/bin/clickhouse
    2022.09.08 21:16:21.654195 [ 228 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../programs/server/Server.cpp:466: DB::Server::run() @ 0xdc326a0 in /usr/bin/clickhouse
    2022.09.08 21:16:21.666991 [ 228 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../contrib/poco/Util/src/ServerApplication.cpp:0: Poco::Util::ServerApplication::run(int, char**) @ 0x38e319d9 in /usr/bin/clickhouse
    2022.09.08 21:16:21.916078 [ 228 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../programs/server/Server.cpp:0: mainEntryClickHouseServer(int, char**) @ 0xdc2b4e2 in /usr/bin/clickhouse
    2022.09.08 21:16:21.929922 [ 228 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../programs/main.cpp:0: main @ 0xdc25fdb in /usr/bin/clickhouse
    2022.09.08 21:16:21.929981 [ 228 ] {} <Fatal> BaseDaemon: 12. __libc_start_main @ 0x7fbe21b2c083 in ?
    2022.09.08 21:16:30.357032 [ 228 ] {} <Fatal> BaseDaemon: 13. _start @ 0xdb636ae in /usr/bin/clickhouse
    2022.09.08 21:16:31.383233 [ 228 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 6200AC7C1270DC293DF3302E1C64399B)
    ...
    2022.09.08 21:16:40.564453 [ 228 ] {} <Information> SentryWriter: Sending crash report

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41046/a0b85eaca8d4003c9fbc4571b30830d30f1984e9/integration_tests__asan__[3/3].html

Though another option is to increase waiting time.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-10 21:38:35 +02:00
Azat Khuzhin
ced30a2072 Switch to llvm/clang 15
It had been released few hours ago, and I want to check how clang-15
generates DWARF-5

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-10 21:38:34 +02:00
Alexey Milovidov
69792adfa2 Add a test for #4242 2022-09-10 05:32:23 +02:00
robot-clickhouse
5bc2845e49 Automatic style fix 2022-09-10 03:17:34 +00:00
Alexey Milovidov
f2227e125f Fix test 2022-09-10 05:11:09 +02:00
Alexey Milovidov
61278c81e4 Merge branch 'master' into remove-useless-line 2022-09-10 05:07:10 +02:00
robot-clickhouse
79ccce23e9 Automatic style fix 2022-09-09 20:09:54 +00:00
Igor Nikonov
06070fe0ae
Merge branch 'master' into fix_int8_test_standalone_keeper_mode 2022-09-09 22:03:02 +02:00
Alexey Milovidov
b2b5091ffd
Update 02070_join_on_disk.sql 2022-09-09 22:01:52 +03:00
Denny Crane
ac96f29ae1 make the test to trick fuzzer 2022-09-09 15:00:14 -03:00
Denny Crane
be90cecbd2 Revert "Revert "Fix trivial count optimization with array join""
This reverts commit 17de7b2876.
2022-09-09 14:56:38 -03:00
Azat Khuzhin
763bb18f98 Fix SIGSEGV in SortedBlocksWriter in case of empty block
CI found one issue [1].

Here is the stack trace for invalid read:

<details>

<summary>stack trace</summary>

```
    0: DB::TemporaryFileLazySource::TemporaryFileLazySource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block const&) [inlined] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long(this="") const at string:1445:22
    1: DB::TemporaryFileLazySource::TemporaryFileLazySource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block const&) [inlined] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(this="", __str="") at string:1927
    2: DB::TemporaryFileLazySource::TemporaryFileLazySource(this=0x00007f3aec105f58, path_="", header_=0x00007f38ffd93b40) at TemporaryFileLazySource.cpp:11
    3: DB::SortedBlocksWriter::streamFromFile(std::__1::unique_ptr<Poco::TemporaryFile, std::__1::default_delete<Poco::TemporaryFile> > const&) const [inlined] DB::TemporaryFileLazySource* std::__1::construct_at<DB::TemporaryFileLazySource, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block, DB::TemporaryFileLazySource*>(__args=0x00007f38ffd91560) at construct_at.h:38:50
    4: DB::SortedBlocksWriter::streamFromFile(std::__1::unique_ptr<Poco::TemporaryFile, std::__1::default_delete<Poco::TemporaryFile> > const&) const [inlined] void std::__1::allocator_traits<std::__1::allocator<DB::TemporaryFileLazySource> >::construct<DB::TemporaryFileLazySource, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block, void, void>(__args=0x00007f38ffd91560) at allocator_traits.h:298
    5: DB::SortedBlocksWriter::streamFromFile(std::__1::unique_ptr<Poco::TemporaryFile, std::__1::default_delete<Poco::TemporaryFile> > const&) const [inlined] std::__1::__shared_ptr_emplace<DB::TemporaryFileLazySource, std::__1::allocator<DB::TemporaryFileLazySource> >::__shared_ptr_emplace<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block>(this=0x00007f3aec105f40, __args=0x00007f38ffd91560) at shared_ptr.h:293
    6: DB::SortedBlocksWriter::streamFromFile(std::__1::unique_ptr<Poco::TemporaryFile, std::__1::default_delete<Poco::TemporaryFile> > const&) const [inlined] std::__1::shared_ptr<DB::TemporaryFileLazySource> std::__1::allocate_shared<DB::TemporaryFileLazySource, std::__1::allocator<DB::TemporaryFileLazySource>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block, void>(__args=<unavailable>, __args=<unavailable>) at shared_ptr.h:954
    7: DB::SortedBlocksWriter::streamFromFile(std::__1::unique_ptr<Poco::TemporaryFile, std::__1::default_delete<Poco::TemporaryFile> > const&) const [inlined] std::__1::shared_ptr<DB::TemporaryFileLazySource> std::__1::make_shared<DB::TemporaryFileLazySource, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block, void>(__args=<unavailable>, __args=<unavailable>) at shared_ptr.h:963
    8: DB::SortedBlocksWriter::streamFromFile(this=<unavailable>, file=<unavailable>) const at SortedBlocksWriter.cpp:238
    9: DB::SortedBlocksWriter::premerge(this=<unavailable>) at SortedBlocksWriter.cpp:209:32
```

</details>

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41046/adea92f847373d1fcfd733d8979c63024f9b80bf/stress_test__asan_.html

So the problem here is that there was empty unique_ptr<> reference to
temporary file, because of empty block that accepted by
SortedBlocksWriter::insert(), but insert() is not a problem the problem
is premerge() that steals blocks from insert() and do not have check
that there are some rows. However this check exists in
SortedBlocksWriter::flush(), and in that case temporary file is not
created.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-09 19:52:38 +02:00
Anton Popov
a1b5582a7c
Merge pull request #37152 from CurtizJ/fix-filling-of-missed-nested
Fix filling of missed Nested columns with multiple levels
2022-09-09 19:29:01 +02:00
Alexander Tokmakov
e77b9e4d0c
Merge pull request #40775 from azat/ci/core-dumps-rework
Rework core collecting on CI (eliminate gcore usage)
2022-09-09 20:20:10 +03:00
Igor Nikonov
4491b4f29b
Merge branch 'master' into fix_int8_test_standalone_keeper_mode 2022-09-09 19:11:14 +02:00
zhenjial
da8e5631ea fix test 2022-09-10 00:47:34 +08:00
Dmitry Novik
64c4023737
Merge branch 'master' into grouping-comp 2022-09-09 18:05:01 +02:00
zhenjial
bd9fabc3f7 code optimization, add test 2022-09-09 23:27:42 +08:00
Mikhail f. Shiryaev
b815fdbc8c
Merge pull request #41088 from ClickHouse/darwin-releases
Add macos binaries to release assets
2022-09-09 17:17:15 +02:00
avogar
ad68b7be0f Better 2022-09-09 15:01:45 +00:00
Igor Nikonov
dbfb448290 Fix: integration test, standalone keeper mode
There is logic regarding which keeper binary use to start keeper cluster in an integration test
There 2 options:
(1) standalone keeper binary (expected binary name clickhouse-keeper)
(2) clickhouse binary with keeper inside

Fixed:
- option (1) didn't work since docker_compose_keeper.yaml didn't create
target clickhouse-keeper at all
- if clickhouse-keeper existed, option (1) was taken but
  clickhouse-keeper could be just a link to clickhouse binary (the link
  is created always during build if cmake option BUILD_STANDALONE_KEEPER is OFF)
2022-09-09 14:51:34 +00:00
Roman Vasin
d105ebe2fe Fix 02403_enable_date32_results test 2022-09-09 13:54:28 +00:00
robot-clickhouse
aeac3916ef Automatic style fix 2022-09-09 12:27:13 +00:00
Alexander Tokmakov
3df65b9cfb
Update 01172_transaction_counters.sql 2022-09-09 15:25:52 +03:00
Antonio Andelic
2472b9c404 Mark primary key test as long 2022-09-09 12:24:26 +00:00
Antonio Andelic
32483aeec8 Merge branch 'master' into keeper-storage 2022-09-09 12:24:01 +00:00
Sergei Trifonov
76eb001e78 add test for changeable_in_readonly + fix SQL in docs 2022-09-09 14:01:29 +02:00
Raúl Marín
b33c1fa60f Fix query_views_log with Window views 2022-09-09 13:46:53 +02:00
Alexander Tokmakov
48927ba0ac
Merge branch 'master' into no-hardlinks-while-making-backup-of-mergetree-in-atomic-db 2022-09-09 14:24:44 +03:00
Frank Chen
2fb0ae7002 Update test case 2022-09-09 19:02:42 +08:00
Azat Khuzhin
927f763cbb tests: disable zero copy replication to suppress warning in 01650_fetch_patition_with_macro_in_zk_path_long
Fixes: #41108
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-09 10:12:32 +02:00
Antonio Andelic
43b6f395fb Mark the test as long 2022-09-09 06:38:44 +00:00
Frank Chen
92a92baa33 Simplify test
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-09 12:18:27 +08:00
Frank Chen
237abffdba Improve test
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-09 12:02:02 +08:00
Alexey Milovidov
9e8e66c567
Merge pull request #41025 from den-crane/test/column_name_primary
test for column name primary
2022-09-09 00:04:53 +03:00
Vitaly Baranov
10629a66e5 Fix black. 2022-09-08 20:58:51 +02:00
avogar
46a0318a36 Support JSONColumnsWithMetadata input format 2022-09-08 17:58:44 +00:00
Vitaly Baranov
e48cd2b6f6 Add more test cases. 2022-09-08 18:14:25 +02:00
avogar
c380decbbb Make better, add new settings 2022-09-08 16:07:20 +00:00
robot-clickhouse
807b09f6b0 Automatic style fix 2022-09-08 15:52:00 +00:00
Sergei Trifonov
f92b6a6176
Merge branch 'master' into readonly-settings-allow 2022-09-08 17:44:32 +02:00
Sergei Trifonov
62541ab764 fix more tests and clang tidy build 2022-09-08 17:43:09 +02:00
Antonio Andelic
b99996961d Address PR comments 2022-09-08 12:45:36 +00:00
Vitaly Baranov
122009a2bd Use table lock if database is ordinary and zero-copy-replication is enabled. 2022-09-08 13:54:59 +02:00
Kruglov Pavel
04aea19b31
Merge pull request #40881 from coelho/patch-1
Fix uncaught DNS_ERROR on failed connection to replicas
2022-09-08 13:32:45 +02:00
Vladimir C
90647cb0c5
Merge pull request #39970 from SachinSetiya/majority_quorum
Add majority_insert_quorum setting
2022-09-08 11:31:33 +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
Robert Schulze
9d4de0cbaa
Merge pull request #40999 from ClickHouse/sse2-special-build
Add special x86-SSE2-only build
2022-09-08 09:06:29 +02:00
Frank Chen
329f31e7ab Address review comments
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-08 11:38:10 +08:00
Anton Popov
7c12b448b8 Merge remote-tracking branch 'upstream/master' into HEAD 2022-09-08 01:52:52 +00:00
avogar
5c0c19c533 Make generic solution 2022-09-07 18:49:34 +00:00
Mikhail f. Shiryaev
c0ce4c2d6f
Add macos binaries to GH release assets 2022-09-07 19:23:44 +02:00
Mikhail f. Shiryaev
a067907fbe
Add typing and order import 2022-09-07 19:23:43 +02:00
Mikhail f. Shiryaev
bd83e905d3
Fix a typo in download_build_with_progress 2022-09-07 19:23:43 +02:00
Mikhail f. Shiryaev
7cdd8c3304
Move download template to env_helper 2022-09-07 19:23:42 +02:00
Mikhail f. Shiryaev
257c4328f7
Rename get_build_urls to read_build_urls 2022-09-07 19:23:41 +02:00
Mikhail f. Shiryaev
f3cf1069dc
Fix header for autogenerated version 2022-09-07 19:23:41 +02:00
Robert Schulze
fe8f84dccc
Exclude slow tests from fasttest profile
99% of all tests in the fasttest profile run in one sec or less. The
excluded tests take 10 sec or more (the slowest being
02271_replace_partition_many_tables with 30 sec).

Estimated savings: 7 min
2022-09-07 15:57:29 +00:00
Dmitry Novik
499e479892
Merge pull request #40873 from azat/build/fix-debug-symbols-quirk
Fix debug symbols
2022-09-07 17:31:35 +02:00
avogar
9da22f7b7c Fix possible use-heap-after-free in -Map combinator 2022-09-07 15:06:56 +00:00
Vitaly Baranov
31ed722572
Merge pull request #41044 from vitlibar/more-conventional-conversion-yaml-to-xmk
More conventional conversion yaml to xml
2022-09-07 13:46:32 +02:00
vdimir
ef53741d23
Disable 02377_majority_insert_quorum_zookeeper for replicated-database 2022-09-07 11:22:18 +00:00
vdimir
000ba8a60d
Use insert_qurum = auto instead of majority_insert_quorum 2022-09-07 11:19:27 +00:00
Sachin
ade4337978
Add majority_insert_quorum setting
majority_insert_quorum is defined as (number_of_replicas/2)+1. Insert
will be successful only if majority of quorum have applied it. If
insert_quorum and majority_insert_quorum both are specified, max of
both will be used.
2022-09-07 11:19:24 +00:00
Antonio Andelic
61398cee80 Merge branch 'master' into keeper-linearizable-reads 2022-09-07 10:25:35 +00:00
Kruglov Pavel
b2ea21508d
Fix test 2022-09-07 12:04:05 +02:00
Vitaly Baranov
9c847ceec9 No hardlinks while making backup of MergeTree in atomic database. 2022-09-07 11:44:50 +02:00
Mikhail f. Shiryaev
7f9d9f6ec7
Merge pull request #41074 from ClickHouse/can-be-tested
CheckLabels: Print message that 'can be tested' is missing
2022-09-07 11:28:53 +02:00
Antonio Andelic
d15fdae8dc
Merge pull request #40853 from ClickHouse/embeddedrocksdb-delete-update-support
Support for `UPDATE` and `DELETE` in `EmbeddedRocksDB`
2022-09-07 11:03:49 +02:00
robot-clickhouse
01139d9d28 Automatic style fix 2022-09-07 08:51:02 +00:00
Robert Schulze
497b65f41d
CheckLabels: Print message that 'can be tested' is missing 2022-09-07 08:42:53 +00:00
Nikolay Degterinsky
981e9dbce2
Merge pull request #40997 from canhld94/ch_canh_fix_grouping_set
Fix grouping set with group_by_use_nulls
2022-09-07 00:08:31 +02:00
Sergei Trifonov
77ee4c04aa fix stateless tests 2022-09-06 20:28:50 +02:00
Vitaly Baranov
63e992d52d Edit test configs. 2022-09-06 17:09:26 +02:00
Frank Chen
f21ab12d8e Use sleep to wait for flush 2022-09-06 22:21:31 +08:00
Sergei Trifonov
6217559175
Merge branch 'master' into readonly-settings-allow 2022-09-06 16:10:48 +02:00
Anton Popov
f76c1482bd try to fix filling of missed Nested columns with multiple levels 2022-09-06 13:56:32 +00:00
Nikita Taranov
7c4f42d014
Skip empty literals in lz4 decompression (#40142) 2022-09-06 13:58:26 +02:00
Sergei Trifonov
f77809ddbc
Merge pull request #40900 from ClickHouse/s3-detailed-metrics
S3 detailed metrics
2022-09-06 13:20:57 +02:00
Anton Ivashkin
e91d22a5b7 Merge branch 'fix-ordinary-system-unfreeze' of github.com:PolyProgrammist/ClickHouse into fix-ordinary-system-unfreeze 2022-09-06 12:18:05 +03:00
Anton Ivashkin
5e7cf1f238 Fix test_merge_tree_s3/test.py::test_freeze_system_unfreeze[node] 2022-09-06 12:14:40 +03:00
FArthur-cmd
de481d3af8 fix style 2022-09-06 11:51:00 +03:00
Filatenkov Artur
7949b3fb74
Merge branch 'master' into annoy 2022-09-06 11:23:15 +03:00
FArthur-cmd
33be03f1e2 turn off test for arm 2022-09-06 08:18:17 +00:00
Frank Chen
49556dad97 Add test cases 2022-09-06 15:59:36 +08:00
Denny Crane
b7cf8783eb test for column name primary 2022-09-06 00:14:55 -03:00
Duc Canh Le
ad52cfdf3a fix test style 2022-09-06 09:39:27 +08:00
Duc Canh Le
6950016b8a fix grouping set with group_by_use_nulls 2022-09-06 09:39:27 +08:00
Alexey Milovidov
b32c7e4c70
Merge pull request #35262 from kssenii/add-more-s3-tests
Add stateless tests with s3 storage with debug and tsan
2022-09-06 02:40:58 +03:00
Alexey Milovidov
59bd94dcf8
Merge pull request #40975 from vitlibar/fix-access-rights-for-describe
Fix access rights for DESCRIBE TABLE
2022-09-06 02:38:34 +03:00
Alexey Milovidov
9091995934
Merge pull request #40978 from azat/log-ignore-memory-limits
[RFC] Ignore memory limits while logging
2022-09-06 02:37:16 +03:00
Kseniia Sumarokova
68e013e819
Update ci_config.py 2022-09-05 22:13:07 +02: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
Alexey Milovidov
4c30dbc905
Merge pull request #40968 from ClickHouse/s3-sharding-2
Sharding s3 key names (2)
2022-09-05 22:47:25 +03:00
Alexey Milovidov
a1998270a9
Merge pull request #40995 from nickitat/fix_tests
Fix tests
2022-09-05 22:45:22 +03:00
Alexander Tokmakov
b264be3c63
Merge branch 'master' into zookeeper_client_fault_injection 2022-09-05 22:13:09 +03:00
Robert Schulze
401747eaa7
Merge branch 'master' into sse2-special-build 2022-09-05 16:17:20 +02:00
Kseniia Sumarokova
360bc93c87
Turn off always green mode 2022-09-05 16:16:49 +02:00
ianton-ru
39e1fc7a0f
Merge branch 'master' into fix-ordinary-system-unfreeze 2022-09-05 17:10:59 +03:00
Sergei Trifonov
1c247308f1
Merge branch 'master' into s3-detailed-metrics 2022-09-05 15:55:41 +02:00
Sergei Trifonov
225773634c fix integration test for profile events s3 2022-09-05 15:54:28 +02:00