Sema Checherinda
0b641fcead
Merge pull request #47564 from CheSema/remove-redundant
...
remove counters for threads, fix negative counters
2023-03-18 02:23:52 +01:00
Nikolay Degterinsky
7fb171f84d
Merge pull request #47596 from evillique/native-client-ssl
...
Add SSL User Certificate authentication to the native protocol
2023-03-17 21:27:58 +01:00
alexX512
023c0ba46e
Fix comments
2023-03-17 20:05:10 +00:00
alexX512
6ea522adee
Style fix
2023-03-16 14:23:17 +00:00
alexX512
cf75dd2595
Remove sleep_in_receive_cancel
2023-03-16 04:39:11 +00:00
Sema Checherinda
67ac858a52
remove counters for threads, fix negative counters
2023-03-15 22:22:22 +01:00
Andrey Zvonov
4327d707e0
Merge branch 'master' into zvonand-implicit-tz
2023-03-15 22:18:52 +01:00
alexX512
f32df219ef
Merge branch 'master' of github.com:alexX512/ClickHouse
2023-03-15 19:54:24 +00:00
alexX512
1f21ac8fcf
Fix fast test
2023-03-15 19:53:58 +00:00
Alexey Perevyshin
1e9ef12f51
Merge branch 'master' into master
2023-03-15 22:21:02 +04:00
zvonand
bbb31cf891
added validation on setting modification
2023-03-15 18:37:23 +01:00
alexX512
0088c18192
Fix fasttest error
2023-03-15 13:37:47 +00:00
alexX512
cbbdb5aabc
Fix typos
2023-03-15 13:05:38 +00:00
alexX512
d47e10484f
Merge branch 'master' of github.com:ClickHouse/ClickHouse
2023-03-15 11:14:34 +00:00
Azat Khuzhin
bcf381c5ae
Reimplement interserver mode to avoid replay attacks
...
Prevous implementation (DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET)
accepts the salt from the client, which make it useless.
Reimplement the protocol to send the salt by the server and use it in
the client instead.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-15 08:28:43 +01:00
alexX512
14a7c5a019
Add stop_reading_on_first_cancel setting
2023-03-15 06:06:55 +00:00
Nikolay Degterinsky
398978e0bc
Fix build
2023-03-15 00:09:29 +00:00
Nikolay Degterinsky
f3908a9e84
Fix style
2023-03-14 22:49:10 +00:00
Nikolay Degterinsky
eddda2eb73
Add SSL authentication to the native protocol
2023-03-14 22:10:08 +00:00
Alexey Milovidov
a411ae10b5
Merge pull request #47486 from ClickHouse/revert_25674
...
Remove "asynchronous connection drain"
2023-03-13 21:40:39 +03:00
Vladimir C
9cb018545c
Merge pull request #47499 from FrankChen021/span_kind
2023-03-13 11:35:03 +01:00
Frank Chen
0bdd645049
SET SpanKind for HTTP/TCP/GRPC handler
2023-03-12 21:31:08 +08:00
Alexander Tokmakov
7b1b238d0b
Revert "Merge pull request #25674 from amosbird/distributedreturnconnection"
...
This reverts commit 5ffd99dfd4
, reversing
changes made to 2796aa333f
.
2023-03-11 19:09:47 +01:00
zvonand
1ce697d8c0
Revert "revert protocol changes, found better way"
...
This reverts commit 3a918ae66a
.
2023-03-07 16:05:23 +01:00
Kruglov Pavel
9e64441353
Merge pull request #47214 from azat/interserver-mode-address
...
Add real client (initiator server) address into the logs for interserver mode
2023-03-07 12:40:59 +01:00
zvonand
5e7a861e68
fix
2023-03-07 02:45:47 +01:00
zvonand
3a918ae66a
revert protocol changes, found better way
2023-03-07 02:33:46 +01:00
zvonand
f2fbf2d61e
tcp protocol modification (min revision to be updated)
2023-03-06 02:52:05 +01:00
Alexander Tokmakov
082194a755
Merge pull request #47175 from ClickHouse/correct_fatal_handling
...
More correct handling of fatal errors
2023-03-04 00:38:00 +03:00
Azat Khuzhin
5403360924
Add real client (initiator server) address into the logs for interserver mode
...
It is useful to understand what is going on, in some obscure cases, for
instance if someone will copy configuration from the production to some
docker env, and then you will see docker's private network addresses
in the logs.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-03 16:38:10 +01:00
Alexander Tokmakov
619b282060
more correct handling of fatal errors
2023-03-03 01:22:04 +01:00
Alexander Tokmakov
edd238273c
fix another bug in client
2023-03-02 19:51:05 +01:00
Alexander Tokmakov
a97e15e36f
Merge branch 'master' into fix_insert_cancellation_in_native_protocol
2023-03-01 14:26:41 +01:00
Alexander Tokmakov
cad1e0b768
fix
2023-02-25 01:18:34 +01:00
Alexey Milovidov
f28ab14759
Better handling of fatal errors
2023-02-24 23:29:06 +01:00
Alexander Tokmakov
fe92fd8a61
Merge branch 'master' into fix_insert_cancellation_in_native_protocol
2023-02-23 22:35:31 +01:00
Alexander Tokmakov
e660c0838c
fix multipart requests
2023-02-22 17:54:35 +01:00
Alexander Tokmakov
592af6d652
fix incomplete interst through http
2023-02-22 02:34:03 +01:00
Alexander Tokmakov
f5c232707d
cancel insert queries correctly
2023-02-21 22:04:39 +01:00
Alexey Milovidov
d8cda3dbb8
Remove PVS-Studio
2023-02-19 23:30:05 +01:00
Azat Khuzhin
6f7b6e9206
Remove extra try/catch for QueryState reset
...
It was possible back when destuctors may throw, in a pre C++11.
I've found one place where it may throw from 2012:
~UnionBlockInputStream()
{
...
if (exception && !std::uncaught_exception())
exception->rethrow();
...
}
Refs: 8a053aba54
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-18 10:55:15 +01:00
Alexey Milovidov
dd79c5f4f6
Easy debugging of clickhouse-server in Docker
2023-02-14 09:49:05 +01:00
Alexey Milovidov
2e57fab8e3
Instrumentation of callbacks for distributed queries
2023-02-12 10:04:05 +01:00
Nikita Mikhaylov
33877b5e00
Parallel replicas. Part [2] ( #43772 )
2023-02-03 14:34:18 +01:00
Alexander Tokmakov
6ddd76c5a0
fix
2023-01-24 01:30:26 +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
Alexander Tokmakov
5cd90c1a3e
Merge branch 'master' into exception_message_patterns
2023-01-17 20:04:04 +01:00
Nikita Mikhaylov
0fc755806e
One more attempt to fix race in TCPHandler ( #45240 )
2023-01-17 16:17:14 +01:00
Alexander Tokmakov
870cfcc36a
less fmt::runtime usages
2023-01-17 00:11:59 +01:00
Nikolai Kochetov
9893d35476
Fix data race in s3Cluster.
2023-01-10 15:34:52 +00:00
Yakov Olkhovskiy
ce533af162
remove unnecessary includes
2022-12-23 19:29:51 +00:00
Yakov Olkhovskiy
a166dde9c4
add member function getLastForwardedFor to ClientInfo
2022-12-23 18:32:29 +00:00
Yakov Olkhovskiy
8462b724ca
Merge branch 'master' into feature-protocol-proxy
2022-12-20 13:12:07 -05:00
Yakov Olkhovskiy
9092134544
auth_use_forwarded_address config setting added, using forwarded address for proxied TCP and HTTP connection, likely bug is fixed in AccessControl, relevant test is appended
2022-12-20 17:39:40 +00:00
Anton Popov
cce3257f39
Merge branch 'master' into optimize-storage-s3
2022-12-13 21:35:12 +01:00
Nikolay Degterinsky
19e95e8cd8
Better implementation of password rules
2022-12-11 23:59:04 +00:00
Yakov Olkhovskiy
a98ce7d2be
propagate PROXYv1 forwarded_for address to http handler in composable protocols; some logging added
2022-12-11 23:39:16 +00:00
Anton Popov
8c95308a08
fix table function s3Cluster
2022-12-07 17:00:10 +00:00
Azat Khuzhin
56bc85746f
Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
...
Conflicts:
- src/Interpreters/ProcessList.cpp
2022-10-22 16:49:08 +02:00
Azat Khuzhin
4e76629aaf
Fixes for -Wshorten-64-to-32
...
- lots of static_cast
- add safe_cast
- types adjustments
- config
- IStorage::read/watch
- ...
- some TODO's (to convert types in future)
P.S. That was quite a journey...
v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Alexey Milovidov
ee5f5a4cb4
Unfathomable amount of trash
2022-10-21 05:33:17 +02:00
Yakov Olkhovskiy
3ce1fa09d6
Merge pull request #41198 from ClickHouse/composable-protocol
...
Composable protocol
2022-10-17 11:23:12 -04:00
Kseniia Sumarokova
3819a21033
Merge pull request #42078 from azat/insert-progress
...
Fix progress for INSERT SELECT
2022-10-11 10:56:20 +02:00
Yakov Olkhovskiy
2229087896
Merge branch 'master' into composable-protocol
2022-10-07 02:23:26 -04:00
Azat Khuzhin
3efd941233
Fix final progress for INSERT SELECT over TCP
...
Move sending of progress and profile events after calling
BlockIO::onFinish() since it will call on_finish callback, that will do
the final flush of progress (at least WriteProgress).
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-05 19:12:18 +02:00
Robert Schulze
6d70b4a1f6
Generate config_version.h into ${CONFIG_INCLUDE_PATH}
...
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.
2022-09-28 12:48:26 +00:00
Yakov Olkhovskiy
fc78af3f69
add 'default_database' endpoint config parameter
2022-09-19 02:01:09 +00:00
Yakov Olkhovskiy
c66f412300
pass session certificate for showCertificate()
2022-09-18 07:11:52 +00:00
Yakov Olkhovskiy
0d6d9e7e44
Merge branch 'master' into composable-protocol
2022-09-11 18:59:57 -04:00
Yakov Olkhovskiy
772bf050da
add PROXYv1 handler, add stack exchange data block, tuneup protocols config
2022-09-10 20:21:37 +00:00
Frank Chen
bb00dcc19b
Remove using namespace from header
...
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-25 20:20:13 +08:00
Frank Chen
99c37ce6c6
Merge branch 'master' into tracing_context_propagation
2022-08-25 10:07:16 +08:00
Frank Chen
cd19366b44
Move classes into DB::OpenTelemetry namespace
2022-08-24 16:41:40 +08:00
Alexander Tokmakov
77178a18fa
fix race on system restart replica
2022-08-23 16:10:44 +02:00
Frank Chen
a3b6ad2a65
Merge branch 'master' into tracing_context_propagation
2022-08-18 20:59:07 +08:00
Alexey Milovidov
8c3d1f2b5b
Merge branch 'master' into server-side-time
2022-08-12 17:40:02 +03:00
Nikita Taranov
17956cb668
Extend protocol with query parameters ( #39906 )
2022-08-12 14:28:35 +02:00
Alexey Milovidov
33e43cc6f9
Merge branch 'master' into server-side-time
2022-08-10 07:28:15 +03:00
Yakov Olkhovskiy
5304e773cd
no session in interserver mode
2022-08-09 12:10:09 -04:00
Yakov Olkhovskiy
d39e9f65de
Merge branch 'master' into fix-quota-key
2022-08-08 11:54:21 -04:00
Alexey Milovidov
855e52a7c9
Send final ProfileEvents just in case
2022-08-08 07:12:08 +02:00
Alexey Milovidov
db85ebfaa7
Add server-side time to Progress
2022-08-08 06:55:41 +02:00
Alexander Tokmakov
c983f14ed1
Merge pull request #39925 from ClickHouse/log_test_on_connection_close
...
Add logging to debug flaky tests
2022-08-05 16:20:17 +03:00
Alexander Tokmakov
e59f217f8d
add test logs on connection close
2022-08-05 13:33:27 +02:00
Alexander Tokmakov
20cf4e8d22
slightly more readable if conditions
2022-08-04 18:04:06 +02:00
Yakov Olkhovskiy
1680be19ca
some refactoring
2022-08-03 16:36:52 -04:00
Yakov Olkhovskiy
2e34b384c1
update tcp protocol, add quota_key
2022-08-03 15:44:08 -04:00
Frank Chen
40c6e4c0d6
Merge remote-tracking branch 'origin/master' into tracing_context_propagation
2022-08-02 10:02:09 +08:00
Anton Kozlov
ae7fd5bf93
Default database resolution in distributed reads
2022-07-29 13:35:57 +00:00
Amos Bird
90fa4863f9
Text log source regexp
2022-07-13 17:52:14 +08:00
Frank Chen
90efbc323d
Fix conflicts
2022-07-07 17:44:32 +08:00
Frank Chen
93dc109e36
Fix code
2022-07-07 17:44:19 +08:00
Frank Chen
19f3f3e6ca
Initialize thread tracing context for TCPServer
2022-07-07 17:42:22 +08:00
Alexey Milovidov
02adad3f27
Merge pull request #37860 from amosbird/remove-duplicated-log
...
Remove duplicate peak mem log
2022-07-07 08:16:06 +03:00
Azat Khuzhin
9eeb856519
Fix INSERT into Distributed hung due to ProfileEvents
...
Right now RemoteInserter does not read ProfileEvents for INSERT, it
handles them only after sending the query or on finish.
But #37391 sends them for each INSERT block, but sometimes they can be
no ProfileEvents packet, since it sends only non-empty blocks.
And this adds too much complexity, and anyway ProfileEvents are useless
for the server, so let's send them only if the query is initial (i.e.
send by user).
Note, that it is okay to change the logic of sending ProfileEvents w/o
changing DBMS_TCP_PROTOCOL_VERSION, because there were no public
releases with the original patch included yet.
Fixes : #37391
Refs: #35075
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-22 15:41:15 +03: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
Anton Popov
df6882d2b9
Revert "Fix errors of CheckTriviallyCopyableMove type"
2022-06-07 13:53:10 +02:00
Vitaly Baranov
d199478169
Merge pull request #37303 from ClickHouse/fix_trash
...
Try to fix some trash
2022-06-07 10:17:39 +02:00
Robert Schulze
2d87af2a15
Merge pull request #37647 from DevTeamBK/Fix-all-CheckTriviallyCopyableMove-Errors
...
Fix errors of CheckTriviallyCopyableMove type
2022-06-05 19:58:47 +02:00