Commit Graph

98250 Commits

Author SHA1 Message Date
Denny Crane
7cfdfbe787 disable optimize_rewrite_sum_if_to_count_if by default 2022-09-15 15:30:24 -03:00
Alexander Tokmakov
32391f737a Merge branch 'master' into fix_41209 2022-09-15 20:27:51 +02:00
avogar
ef7f7b30aa Fix tests 2022-09-15 18:20:17 +00:00
avogar
92979af3bf Add missing methods in combinators 2022-09-15 17:45:50 +00:00
alesapin
82611d891b
Merge branch 'master' into fix-odr-vialation 2022-09-15 19:33:09 +02:00
Nikolai Kochetov
ee361c6d46 Enable DNS cache updater earlier. 2022-09-15 17:31:28 +00:00
alesapin
be81d653e1 Fix comment 2022-09-15 18:56:16 +02:00
alesapin
b098c1be36 Fix data duplication in zero copy replication 2022-09-15 18:54:27 +02: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
39307f9dba Extract into function 2022-09-15 16:14:53 +00:00
Antonio Andelic
761d53b438 Use merged NuRaft 2022-09-15 16:14:45 +00: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
Anton Popov
b5e9884355 fix subcolumns tree 2022-09-15 14:17:10 +00: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
alesapin
7570c5cf67 Remove recursive without blobs 2022-09-15 15:31:19 +02:00
Roman Vasin
3ce66eab83 Correct all needed MD files 2022-09-15 13:28:11 +00:00
alesapin
c585ed47fc Forget to remove 2022-09-15 15:15:28 +02:00
serxa
b3b8123f73 fix style 2022-09-15 12:53:56 +00:00
alesapin
e127c8b4a9 Add kringe 2022-09-15 14:49:31 +02:00
alesapin
c04f7afb2a Delete kringe 2022-09-15 14:48:59 +02:00
Roman Vasin
563449779c Replace enable_date32_results by enable_extended_results_for_datetime_functions 2022-09-15 12:48:09 +00:00
Alexander Tokmakov
b26cc5a1ba
Merge pull request #41296 from young-scott/fix_issuse_41096
fix issue #41096
2022-09-15 15:44:05 +03:00
avogar
6bb6c9e916 Fix comment 2022-09-15 12:41:39 +00:00
avogar
d41bb7c2a4 Fix comment 2022-09-15 12:40:32 +00:00
Alexander Tokmakov
77c4ea9647 fix 2022-09-15 14:34:31 +02:00
Kseniia Sumarokova
08f00a7593
Merge pull request #41354 from ClickHouse/kssenii-patch-5
Update storing-data.md
2022-09-15 14:07:43 +02: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
Azat Khuzhin
5cc5ca22de Fix possible deadlock with async_socket_for_remote/use_hedged_requests and parallel KILL
Right now it is possible to call QueryStatus::addPipelineExecutor() when
the executors_mutex already acquired, it is possible when the query was
cancelled via KILL QUERY.

Here I will show some traces from debugger from a real example, where
tons of ProcessList::insert() got deadlocked.

Let's look at the lock owner for one of the threads that was deadlocked
in ProcessList::insert():

    (gdb) p *mutex
    $2 = {
      __data = {
        __owner = 46899,
      },
    }

And now let's see the stack trace of the 46899:

    #0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:103
    #1  0x00007fb65569b714 in __GI___pthread_mutex_lock (mutex=0x7fb4a9d15298) at ../nptl/pthread_mutex_lock.c:80
    #2  0x000000001b6edd91 in pthread_mutex_lock (arg=0x7fb4a9d15298) at ../src/Common/ThreadFuzzer.cpp:317
    #3  std::__1::__libcpp_mutex_lock (__m=0x7fb4a9d15298) at ../contrib/libcxx/include/__threading_support:303
    #4  std::__1::mutex::lock (this=0x7fb4a9d15298) at ../contrib/libcxx/src/mutex.cpp:33
    #5  0x0000000014c7ae63 in std::__1::lock_guard<std::__1::mutex>::lock_guard (__m=..., this=<optimized out>) at ../contrib/libcxx/include/__mutex_base:91
    #6  DB::QueryStatus::addPipelineExecutor (this=0x7fb4a9d14f90, e=0x80) at ../src/Interpreters/ProcessList.cpp:372
    #7  0x0000000015bee4a7 in DB::PipelineExecutor::PipelineExecutor (this=0x7fb4b1e53618, processors=..., elem=<optimized out>) at ../src/Processors/Executors/PipelineExecutor.cpp:54
    #12 std::__1::make_shared<DB::PipelineExecutor, std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >&, DB::QueryStatus*&, void> (__args=@0x7fb63095b9b0: 0x7fb4a9d14f90, __args=@0x7fb63095b9b0: 0x7fb4a9d14f90) at ../contrib/libcxx/include/__memory/shared_ptr.h:963
    #13 DB::QueryPipelineBuilder::execute (this=0x7fb63095b8b0) at ../src/QueryPipeline/QueryPipelineBuilder.cpp:552
    #14 0x00000000158c6c27 in DB::Connection::sendExternalTablesData (this=0x7fb6545e9d98, data=...) at ../src/Client/Connection.cpp:797
    #27 0x0000000014043a81 in DB::RemoteQueryExecutorRoutine::operator() (this=0x7fb63095bf20, sink=...) at ../src/QueryPipeline/RemoteQueryExecutorReadContext.cpp:46
    #32 0x000000000a16dd4f in make_fcontext () at ../contrib/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:71

And also in the logs you can see very strange things for this thread:

    2022.09.13 14:14:51.228979 [ 51145 ] {1712D4E914EC7C99} <Debug> Connection (localhost:9000): Sent data for 1 external tables, total 11 rows in 0.00046389 sec., 23688 rows/sec., 3.84 KiB (8.07 MiB/sec.), compressed 1.1070121092649958 times to 3.47 KiB (7.29 MiB/sec.)
    ...
    2022.09.13 14:14:51.719402 [ 46899 ] {7c90ffa4-1dc8-42fd-938c-4e307c244394} <Debug> executeQuery: (from 10.101.15.181:42478) KILL QUERY WHERE query_id = '1712D4E914EC7C99' (stage: Complete)
    2022.09.13 14:14:51.719488 [ 46899 ] {7c90ffa4-1dc8-42fd-938c-4e307c244394} <Debug> executeQuery: (internal) SELECT query_id, user, query FROM system.processes WHERE query_id = '1712D4E914EC7C99' (stage: Complete)
    2022.09.13 14:14:51.719754 [ 46899 ] {7c90ffa4-1dc8-42fd-938c-4e307c244394} <Trace> ContextAccess (default): Access granted: SELECT(user, query_id, query) ON system.processes
    2022.09.13 14:14:51.720544 [ 46899 ] {7c90ffa4-1dc8-42fd-938c-4e307c244394} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
    2022.09.13 14:14:53.228964 [ 46899 ] {7c90ffa4-1dc8-42fd-938c-4e307c244394} <Debug> Connection (localhost:9000): Sent data for 2 scalars, total 2 rows in 2.6838e-05 sec., 73461 rows/sec., 68.00 B (2.38 MiB/sec.), compressed 0.4594594594594595 times to 148.00 B (5.16 MiB/sec.)

How is this possible? The answer is fibers and query cancellation
routine. During cancellation of async queries it going into fibers again
and try to do this gracefully. However because of this during canceling
query it may call QueryStatus::addPipelineExecutor() from
QueryStatus::cancelQuery().

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-15 14:41:27 +03: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
Kseniia Sumarokova
c511c3f168
Merge pull request #40889 from AVMusorin/docs_table_function_update
Doc. Updated optional parameters for table functions
2022-09-15 13:12:20 +02:00
Kseniia Sumarokova
80f073f395
Merge branch 'master' into kssenii-patch-5 2022-09-15 13:11:03 +02:00
Maksim Kita
276d3628e9 Small style fixes 2022-09-15 13:05:18 +02:00
Roman Vasin
3346d8e27b Add many cosmetic changes to C++ code 2022-09-15 10:56:05 +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
Robert Schulze
b4a2a4d1d0
Merge branch 'master' into bump-vectorscan-to-5.4.8 2022-09-15 12:46:40 +02:00
Kseniia Sumarokova
1ec7ce265b
Update storing-data.md 2022-09-15 12:30:02 +02:00
Kseniia Sumarokova
4935a4bf96
Update storing-data.md 2022-09-15 12:29:22 +02:00
Nikita Taranov
def4eeac70
Fix perf tests (#41332)
We run left server two times. If after the first run server will not be properly stopped, we will get `Address already in use: [::]:9001` exception on the second run.
2022-09-15 12:27:08 +02:00
Kseniia Sumarokova
9e37a6356f
Merge pull request #41297 from kssenii/fix-logical-error
Fix incorrect logical error in disk object storage
2022-09-15 12:00:53 +02: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
Kruglov Pavel
982b9baeec
Fix 2022-09-15 11:32:14 +02:00
Nikolay Degterinsky
72d8a04ee6 Add setting 'allow_implicit_no_password' 2022-09-15 08:07:42 +00:00