Azat Khuzhin
f9cd66db36
Remove extra try/catch for LocalQueryState reset
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-18 10:55:09 +01:00
Nikita Mikhaylov
33877b5e00
Parallel replicas. Part [2] ( #43772 )
2023-02-03 14:34:18 +01:00
Alexander Tokmakov
3f6594f4c6
forbid old ctor of Exception
2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages ( #45449 )
...
* save format string for NetException
* format exceptions
* format exceptions 2
* format exceptions 3
* format exceptions 4
* format exceptions 5
* format exceptions 6
* fix
* format exceptions 7
* format exceptions 8
* Update MergeTreeIndexGin.cpp
* Update AggregateFunctionMap.cpp
* Update AggregateFunctionMap.cpp
* fix
2023-01-24 00:13:58 +03:00
Azat Khuzhin
2a8f116c18
Forward declaration of ConcurrentBoundedQueue in ThreadStatus
...
ThreadStatus is the header that recomplies almost all ClickHouse
modules.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 16:02:09 +01:00
Alexey Milovidov
ee5f5a4cb4
Unfathomable amount of trash
2022-10-21 05:33:17 +02:00
kssenii
487bc0fba3
Fix heap use after free
2022-09-06 16:50:58 +02:00
Nikita Taranov
17956cb668
Extend protocol with query parameters ( #39906 )
2022-08-12 14:28:35 +02:00
Azat Khuzhin
4baa7690ae
Send profile events for INSERT queries (previously only SELECT was supported)
...
Reproducer:
echo "1" | clickhouse-client --query="insert into function null('foo String') format TSV" --print-profile-events --profile-events-delay-ms=-1
However, clickhouse-local is differnt, it does sent the periodically,
but only if query was long enough, i.e.:
# yes | head -n100000 | clickhouse-local --query="insert into function null('foo String') format TSV" --print-profile-events --profile-events-delay-ms=-1
[s1.ch] 2022.05.20 15:20:27 [ 0 ] ContextLock: 10 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] DiskReadElapsedMicroseconds: 29 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] IOBufferAllocBytes: 200000 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] IOBufferAllocs: 1 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertQuery: 1 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertedBytes: 1000000 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertedRows: 100000 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] MemoryTrackerUsage: 1521975 (gauge)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] OSCPUVirtualTimeMicroseconds: 102148 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] OSReadChars: 135700 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] OSWriteChars: 8 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] Query: 1 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] RWLockAcquiredReadLocks: 2 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] ReadBufferFromFileDescriptorRead: 5 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] ReadBufferFromFileDescriptorReadBytes: 134464 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] RealTimeMicroseconds: 293747 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] SoftPageFaults: 382 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] TableFunctionExecute: 1 (increment)
[s1.ch] 2022.05.20 15:20:27 [ 0 ] UserTimeMicroseconds: 102148 (increment)
v2: Proper support ProfileEvents in INSERTs (with protocol change)
v3: Receive profile events on INSERT queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-16 11:59:01 +03:00
Azat Khuzhin
29a8a00656
Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
...
v2: fix LocalConnection::sendQuery() for Suggest (comes w/o client_info) [1]
[1]: https://s3.amazonaws.com/clickhouse-test-reports/37290/7c85175963226ff78eec542efafcff4e650aa0f0/stateless_tests__ubsan__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 07:19:27 +03:00
kssenii
0feda67ec4
Fix progress for insert select
2022-05-10 15:04:08 +02:00
Alexey Milovidov
996d838ca3
Merge pull request #36817 from DevTeamBK/Clang-tidy-Fixes
...
Clang -Tidy Fixes
2022-05-06 02:01:00 +03:00
Larry Luo
ee131eefd8
Removed move for trivially-copyable type and added noexcept for move constructor
2022-05-02 18:46:34 -07:00
Robert Schulze
89aa9ae00f
Fixed clang-tidy check "bugprone-branch-clone"
...
The check is currently *not* part of .clang-tidy. It complains about:
(1) "switch has multiple consecutive identical branches"
(2) "repeated branch in conditional chain"
About (1): Lots of findings in switches were about redundant
"[[fallthrough]]" in places where the compiler would not warn anyways. I
have cleaned these up.
About (2): In if-else_if-else chains, fixing the warning would usually
mean concatenating multiple if-conditions. As this would reduce
readability in most cases, I did not fix these places.
Because of (2), I also refrained from adding "bugprone-branch-clone" to
.clang-tidy.
2022-04-30 19:40:28 +02:00
Anton Popov
2de6668b3f
show names of erroneous files
2022-04-16 00:10:47 +00:00
Azat Khuzhin
891c601589
Fix ProfileEvents overlaps (for multiple queries) in clickhouse-local
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 22:27:12 +03:00
Azat Khuzhin
54a1cea7fd
Send ProfileEvents in clickhouse-local on query finish (like server does)
...
v2: send only for pulling pipelines
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 22:26:44 +03:00
Azat Khuzhin
1a8b49b535
Remove redundant check from LocalConnection::finishQuery()
...
It is called from only one place, and under state->is_finished, so state
is there.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 21:18:52 +03:00
Kseniia Sumarokova
cdb9a05229
Merge pull request #34605 from bigo-sg/add_metric_for_local
...
Add cpu/mem metric for clickhouse-local
2022-03-07 11:40:11 +01:00
taiyang-li
1b9987ceb1
fix mistake in check-style
2022-03-05 14:22:56 +08:00
Maksim Kita
b1a956c5f1
clang-tidy check performance-move-const-arg fix
2022-03-02 18:15:27 +00:00
taiyang-li
f83132bad2
finish dev
2022-03-01 15:54:23 +08:00
taiyang-li
e6b29167da
fix style
2022-02-15 20:26:53 +08:00
taiyang-li
24bd47e556
finish dev
2022-02-15 20:11:13 +08:00
taiyang-li
b4440131d0
add metrics for clickhouse-local
2022-02-15 16:25:07 +08:00
kssenii
e41a895ebb
Fix
2022-02-06 16:11:18 +01:00
kssenii
211f1dd482
Fix
2022-01-12 00:28:53 +03:00
kssenii
8cf52918b9
clickhouse local send profile info
2021-12-23 12:37:29 +03:00
Nikita Mikhaylov
dbf5091016
Parallel reading from replicas ( #29279 )
2021-12-09 13:39:28 +03:00
kssenii
d7dab834ec
Fix file progress for local
2021-11-01 00:33:03 +03:00
Azat Khuzhin
b0984a3337
clickhouse-local: fix block lost in interactive mode
...
In case only one block in the query execution, LocalConnection can
return Progress packet instead of the block itself, after it will call
poll() again and the block will got lost.
Fix this by processing block before Progress packet.
And actually AFAICS Progress can be removed after pollImpl(), since
there is Progress handling before.
Fixes : #30282 (cc @kssenii)
2021-10-22 00:46:01 +03:00
Kseniia Sumarokova
cae31437e8
Merge pull request #30336 from kssenii/fix-local-defaults
...
Send table columns in clickhouse-local
2021-10-20 21:18:02 +03:00
kssenii
b7a53df9de
Send columns description in clickhouse-local
2021-10-18 14:53:42 +00:00
kssenii
1cc511789d
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into fix-local-less-threads
2021-10-18 08:30:59 +00:00
kssenii
9525437499
Less threads in local, fix Ok. printing
2021-10-16 10:25:39 +00:00
kssenii
6c0eaf76da
Query stage for local
2021-10-16 08:43:18 +00:00
Dmitry Novik
362bcb2f66
Introduce ProfileEvents packet
2021-10-11 17:29:50 +03:00
kssenii
59cbe8579d
Interrupt listener
2021-09-29 22:01:52 +00:00
kssenii
07b979bda3
Rewrite to processors
2021-09-29 19:17:02 +00:00
kssenii
8e200b68a4
Small fix
2021-09-26 21:22:04 +00:00
kssenii
f3784780fd
Fixes
2021-09-25 08:46:57 +00:00
kssenii
04575eb12b
Review fixes, fix style check and clang-tidy
2021-09-22 21:35:29 +00:00
kssenii
db45363c19
Fix tests
2021-09-19 18:42:45 +00:00
kssenii
55619dcc1b
Correct merge
2021-09-16 16:14:17 +00:00
kssenii
33ff6ec060
Fix tests
2021-09-11 17:17:48 +00:00
kssenii
7f1770cc3c
Fix contexts
2021-09-11 12:03:28 +00:00
kssenii
ddfe1e4d64
Some fixes
2021-09-11 11:34:22 +00:00
kssenii
8f77855981
Some review fixes
2021-09-05 00:52:35 +03:00
kssenii
578a750b8b
Small clean up
2021-08-27 11:47:47 +03:00
kssenii
7d6f3d96c1
Better
2021-08-23 13:01:42 +03:00