ClickHouse/src/Server
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
..
grpc_protos Add field output_columns to first Result sent in gRPC protocol. 2022-02-10 21:05:56 +07:00
HTTP Give exception_code an initialization value 2022-05-04 16:06:43 +02:00
CertificateReloader.cpp base should not depend on Common 2022-04-29 10:26:35 +08:00
CertificateReloader.h Merge pull request #36487 from FArthur-cmd/fix_certificates 2022-04-24 04:58:21 +03:00
CMakeLists.txt Remove unbundled gRPC support 2022-01-20 08:47:16 +03:00
GRPCServer.cpp Merge branch 'master' into refactor-read-metrics-and-callbacks 2022-05-25 16:27:40 +02:00
GRPCServer.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
HTTPHandler.cpp Revert "Revert "Add a setting to use more memory for zstd decompression"" 2022-06-18 15:55:35 +03:00
HTTPHandler.h Support content_type in HTTP handler config 2022-02-26 03:06:17 +03:00
HTTPHandlerFactory.cpp Correct behaviour with unknown methods (#29057) 2021-10-06 14:43:05 +03:00
HTTPHandlerFactory.h base should not depend on Common 2022-04-29 10:26:35 +08:00
HTTPHandlerRequestFilter.h Fix clang-tidy warnings in Server, Storages folders 2022-03-14 18:17:35 +00:00
InterserverIOHTTPHandler.cpp base should not depend on Common 2022-04-29 10:26:35 +08:00
InterserverIOHTTPHandler.h Add settings for HTTP header limitations 2021-06-15 17:33:46 +03:00
IServer.h Make ContextPtr const by default. 2021-05-31 17:49:02 +03:00
KeeperTCPHandler.cpp base should not depend on Common 2022-04-29 10:26:35 +08:00
KeeperTCPHandler.h Merge branch 'master' into standalone_keeper_build 2022-03-11 13:58:44 +01:00
KeeperTCPHandlerFactory.h base should not depend on Common 2022-04-29 10:26:35 +08:00
MySQLHandler.cpp Remove inherited create() method + disallow copying 2022-05-02 08:46:52 +02:00
MySQLHandler.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
MySQLHandlerFactory.cpp Fix clang-tidy-14, part 1 2022-05-27 22:52:14 +02:00
MySQLHandlerFactory.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
NotFoundHandler.cpp Make Poco HTTP Server zero-copy again (#19516) 2021-02-19 15:51:26 +03:00
NotFoundHandler.h Make Poco HTTP Server zero-copy again (#19516) 2021-02-19 15:51:26 +03:00
PostgreSQLHandler.cpp Slightly better mysql handler 2022-04-27 18:28:09 +08:00
PostgreSQLHandler.h base should not depend on Common 2022-04-29 10:26:35 +08:00
PostgreSQLHandlerFactory.cpp Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
PostgreSQLHandlerFactory.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
PrometheusMetricsWriter.cpp Validate prometheus metric name with regex 2021-07-09 19:12:26 +03:00
PrometheusMetricsWriter.h Split programs/server into actual program and library (#11186) 2020-05-27 20:52:52 +03:00
PrometheusRequestHandler.cpp Check all requests 2021-09-30 13:40:48 +08:00
PrometheusRequestHandler.h Make Poco HTTP Server zero-copy again (#19516) 2021-02-19 15:51:26 +03:00
ProtocolServerAdapter.cpp Better cmake 2022-03-11 15:47:07 +01:00
ProtocolServerAdapter.h Fix clang-tidy warnings in Server, Storages folders 2022-03-14 18:17:35 +00:00
ReplicasStatusHandler.cpp Add test 2021-06-16 17:33:14 +03:00
ReplicasStatusHandler.h Add settings for HTTP header limitations 2021-06-15 17:33:46 +03:00
StaticRequestHandler.cpp Revert "Fix errors of CheckTriviallyCopyableMove type" 2022-06-07 13:53:10 +02:00
StaticRequestHandler.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
TCPHandler.cpp Fix INSERT into Distributed hung due to ProfileEvents 2022-06-22 15:41:15 +03:00
TCPHandler.h Fix INSERT into Distributed hung due to ProfileEvents 2022-06-22 15:41:15 +03:00
TCPHandlerFactory.h base should not depend on Common 2022-04-29 10:26:35 +08:00
TCPServer.cpp Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
TCPServer.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
TCPServerConnectionFactory.h Start/stop servers when listen_host/*_port changes 2021-12-24 08:26:02 +01:00
WebUIRequestHandler.cpp Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
WebUIRequestHandler.h Make Poco HTTP Server zero-copy again (#19516) 2021-02-19 15:51:26 +03:00