mergify[bot]
5856856884
Merge branch 'master' into http_proper_summary_and_exception
2022-05-12 16:43:25 +00:00
kssenii
61f2737e17
Merge master
2022-05-10 19:31:22 +02:00
kssenii
0feda67ec4
Fix progress for insert select
2022-05-10 15:04:08 +02:00
taiyang-li
fd878f7e7b
change as requested
2022-05-10 12:06:50 +08:00
Anton Popov
e911900054
remove last mentions of data streams
2022-05-09 19:15:24 +00:00
Robert Schulze
1b81bb49b4
Enable clang-tidy modernize-deprecated-headers & hicpp-deprecated-headers
...
Official docs:
Some headers from C library were deprecated in C++ and are no longer
welcome in C++ codebases. Some have no effect in C++. For more details
refer to the C++ 14 Standard [depr.c.headers] section. This check
replaces C standard library headers with their C++ alternatives and
removes redundant ones.
2022-05-09 08:23:33 +02:00
Alexey Milovidov
3755466e8d
Merge pull request #34916 from nic11/pr/content-type
...
Support content_type in HTTP handler config
2022-05-08 16:36:21 +03:00
wuxiaobai24
58755cb156
add zstd_window_log_max setting
2022-05-08 14:02:40 +08:00
Raúl Marín
5190d9e85a
Give exception_code an initialization value
2022-05-04 16:06:43 +02:00
Raúl Marín
6919b459ee
HTTP: Return a 408 on query timeout
2022-05-04 14:24:34 +02:00
Raúl Marín
d899ef2e48
HTTP: Always return summary data and exception (when possible)
2022-05-04 14:24:04 +02:00
mergify[bot]
64084b5e32
Merge branch 'master' into shared_ptr_helper3
2022-05-03 20:46:16 +00:00
Kruglov Pavel
8d647eff06
Merge pull request #36749 from Avogar/fix-timeouts
...
Fix bug in receive timeouts in Hedged requests
2022-05-02 13:16:03 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
...
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
previously allowed.
Hence, this change
- removes shared_ptr_helper and as a result all inherited create() methods,
- instead, Storage objects are now created using make_shared<>() by the
caller (for that to work, many constructors had to be made public), and
- all Storage classes were marked as noncopyable using boost::noncopyable.
In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Azat Khuzhin
d82f2ff162
Set is_all_data_sent on exceptions too
...
This will avoid clickhouse-test complains about left queries after the
test, like in [1].
[1]: https://s3.amazonaws.com/clickhouse-test-reports/36258/9646487c093a75dc31e3e818417cfad83580b40f/stateful_tests__memory__actions_.html
Follow-up for: #36649
2022-04-30 13:00:44 +03:00
Amos Bird
4a5e4274f0
base should not depend on Common
2022-04-29 10:26:35 +08:00
mergify[bot]
d96c9c5cff
Merge branch 'master' into fix-timeouts
2022-04-28 15:03:19 +00:00
Nikita Mikhaylov
7dc084419e
Check socket is connected in HTTPSession ( #36683 )
2022-04-28 15:12:25 +02:00
avogar
81f85892eb
Fix bug in receive timeouts in Hedged requests
2022-04-28 13:10:27 +00:00
alesapin
8f1a0f6625
Merge pull request #36258 from ClickHouse/keeper-recovery-mode
...
clickhouse-keeper support for force recovery
2022-04-28 11:20:59 +02:00
Kseniia Sumarokova
0d09bb9897
Merge pull request #36699 from amosbird/bettermysqlhandler
...
Slightly better mysql handler
2022-04-27 17:07:35 +02:00
Amos Bird
1cba00478d
Slightly better mysql handler
2022-04-27 18:28:09 +08:00
Azat Khuzhin
6339a48923
Add is_all_data_sent into system.processes
...
v2: fix SHOW PROCESSLIST (does not have process list entry)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-26 12:15:00 +03:00
Antonio Andelic
cf022542bd
Merge branch 'master' into keeper-recovery-mode
2022-04-26 06:50:02 +00:00
Alexey Milovidov
da1b0b491f
Merge pull request #36487 from FArthur-cmd/fix_certificates
...
Add passphrase for certificates
2022-04-24 04:58:21 +03:00
Alexey Milovidov
3b9c72ba94
Update CertificateReloader.cpp
2022-04-24 04:57:46 +03:00
Kseniia Sumarokova
33bb48106f
Merge pull request #36314 from CurtizJ/print-bad-filenames
...
Show names of erroneous files in case of parsing errors while executing table functions
2022-04-22 13:24:55 +02:00
Antonio Andelic
03779fd463
Merge branch 'master' into keeper-recovery-mode
2022-04-21 12:34:18 +00:00
FArthur-cmd
f0a4009f60
Add passphrase for certificates
2022-04-21 12:26:30 +00:00
Antonio Andelic
bbb0be6a44
Merge pull request #36402 from rschu1ze/clang-tidy-contains
...
Activate clang-tidy warning "readability-container-contains"
2022-04-20 08:15:46 +02:00
Anton Popov
3e361c9759
Merge remote-tracking branch 'upstream/master' into HEAD
2022-04-19 14:18:04 +00:00
Antonio Andelic
3e77340a81
Allow clickhouse-keeper to serve 4-letter commands before quorum ( #35992 )
...
* Use async start for clichkouse-keeper
* Return non active server for 4lw commands if quorum not achieved
2022-04-19 14:03:00 +02:00
Antonio Andelic
cd548aeb30
Refactor test for multiple cluster size
2022-04-19 08:08:36 +00:00
Antonio Andelic
6c3bf0a5d3
Format files
2022-04-19 08:08:36 +00:00
Antonio Andelic
ff2ebe113c
WIP
2022-04-19 08:08:35 +00:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
...
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
Alexey Milovidov
1333b4cd89
Merge pull request #36345 from ucasfl/throw-no-data
...
Add setting throw_if_no_data_to_insert
2022-04-18 07:04:16 +03:00
Alexey Milovidov
f6ab2bd523
Merge pull request #36312 from ClickHouse/remove-arcadia
...
Remove remaining parts of Arcadia
2022-04-18 07:02:54 +03:00
Alexey Milovidov
242919eddd
Remove abbreviation
2022-04-18 01:02:49 +02:00
fenglv
0024a08ace
fix
...
fix typo
2022-04-17 15:12:07 +00:00
Anton Popov
2de6668b3f
show names of erroneous files
2022-04-16 00:10:47 +00:00
Alexey Milovidov
416fa95b87
Remove "Arcadia" build system
2022-04-15 23:57:09 +02:00
Azat Khuzhin
097e2f626d
Do not overlap profile events snapshots for queries
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-12 20:54:56 +03:00
Roman Nikonov
daceac5c0b
Merge branch 'master' into pr/content-type
2022-04-10 01:21:28 +03:00
Azat Khuzhin
33d99c8ffb
Introduce compatiblity mode for SETTINGS after FORMAT
...
Add allow_settings_after_format_in_insert setting, OFF by default.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: s/parser_settings_after_format_compact/allow_settings_after_format_in_insert/ (suggested by vitlibar)
v3: replace ParserSettings with a flag (requested by vitlibar)
2022-04-07 16:36:34 +03:00
Roman Nikonov
d81a8cd317
Merge branch 'master' into pr/content-type
2022-04-03 20:53:51 +03:00
Antonio Andelic
8cc18c851d
Merge pull request #35705 from ClickHouse/is-secure-client-info
...
Added `is_secure` column to `query_log`
2022-04-01 08:27:20 +02:00
Azat Khuzhin
ff0e46c394
clickhouse-keeper: finish session on client EOF (fixes heap-use-after-free)
...
CI founds [1]:
WARNING: ThreadSanitizer: heap-use-after-free (pid=1)
Read of size 8 at 0x7b48001e0088 by thread T7 (mutexes: write M2588):
...
1 DB::KeeperTCPHandler::runImpl()::$_0::operator()() const build_docker/../src/Server/KeeperTCPHandler.cpp:384:14 (clickhouse+0x194f974f)
...
8 DB::KeeperDispatcher::setResponse() build_docker/../src/Coordination/KeeperDispatcher.cpp:222:9 (clickhouse+0x1999de82)
9 DB::KeeperDispatcher::responseThread() build_docker/../src/Coordination/KeeperDispatcher.cpp:161:18 (clickhouse+0x1999d7a7)
10 DB::KeeperDispatcher::initialize()::$_1::operator()() const build_docker/../src/Coordination/KeeperDispatcher.cpp:273:54 (clickhouse+0x199a55d1)
Previous write of size 8 at 0x7b48001e0088 by thread T3:
0 operator delete(void*, unsigned long) <null> (clickhouse+0xa0dad50)
1 DB::KeeperTCPHandler::~KeeperTCPHandler() build_docker/../src/Server/KeeperTCPHandler.cpp:648:1 (clickhouse+0x194f8ee6)
[1]: https://s3.amazonaws.com/clickhouse-test-reports/35772/38873d726d22b15d4c5a284410956927b2e2f95f/integration_tests__thread__actions__[4/4].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-31 09:31:34 +03:00
Azat Khuzhin
38873d726d
clickhouse-keeper: fix implementation of server with poll()
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-30 21:30:12 +03:00
Azat Khuzhin
9820230e95
clickhouse-keeper: correctly handle closed client connection
...
This will avoid noisy message like:
DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 4.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-30 20:29:04 +03:00
Antonio Andelic
e15fccd31b
Add is_secure info to HTTP
2022-03-30 06:39:40 +00:00
Antonio Andelic
d14ad227b1
Polish TCP is_secure flag
2022-03-30 06:39:40 +00:00
alesapin
70d410dc4d
Fix keeper client timeout bug
2022-03-22 11:41:50 +01:00
Maksim Kita
2fdcf53a76
Fix clang-tidy warnings in Server, Storages folders
2022-03-14 18:17:35 +00:00
alesapin
96c0e9fddf
Better cmake
2022-03-11 15:47:07 +01:00
alesapin
33ff2f76e5
Merge branch 'master' into standalone_keeper_build
2022-03-11 13:58:44 +01:00
Roman Nikonov
3b60116e6d
Fix merge mistake
2022-03-10 08:57:31 +03:00
Roman Nikonov
83787b9651
Fix support content_type for dynamic_query_handler
2022-03-09 23:48:53 +03:00
alesapin
0c93c9e21d
Merge pull request #35010 from bigo-sg/keeperstatopt
...
Keeper atomic stat
2022-03-07 12:34:28 +01: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
Roman Nikonov
fde94e3cb2
Merge branch 'master' into pr/content-type
2022-03-07 13:19:33 +03:00
taiyang-li
1b9987ceb1
fix mistake in check-style
2022-03-05 14:22:56 +08:00
alesapin
0eb7d28192
Building small keeper binary
2022-03-03 21:27:46 +01:00
zhanglistar
9ee0d2c8a0
keeper atomic stat
2022-03-03 14:30:22 +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
b31440c77a
Merge branch 'master' into add_metric_for_local
2022-03-01 12:29:36 +08:00
Filatenkov Artur
af4362e40a
Improve certificate reloader ( #34887 )
...
* add ec support
* Add test
* fix tests and improve code style
2022-02-28 21:30:02 +03:00
Roman Nikonov
db63b82e1a
Support content_type in HTTP handler config
2022-02-26 03:06:17 +03:00
Vitaly Baranov
aee67a6693
Merge pull request #31484 from eungenue/Implement-SSL-X509-certificate-authentication
...
Implement ssl x509 certificate authentication
2022-02-21 11:30:52 +03:00
Vitaly Baranov
cb66a63aa4
Rename header and config setting for consistency.
2022-02-21 07:41:06 +03:00
Vitaly Baranov
765d136d2a
A few improvements in the implementation of SSL certificate authentication.
2022-02-21 07:41:02 +03:00
taiyang-li
e6b29167da
fix style
2022-02-15 20:26:53 +08:00
taiyang-li
b4440131d0
add metrics for clickhouse-local
2022-02-15 16:25:07 +08:00
Maksim Kita
91bc9cd4cf
Merge pull request #34499 from vitlibar/grpc-send-output-format-back-to-client
...
gRPC: Send output format back to client
2022-02-13 15:34:32 +01:00
Vitaly Baranov
cf2e205b08
Add field output_columns to first Result sent in gRPC protocol.
2022-02-10 21:05:56 +07:00
Vitaly Baranov
bd746fd82b
Add fields query_id and time_zone to first Result sent in gRPC protocol.
2022-02-10 21:05:47 +07:00
Vitaly Baranov
f8c8eeceea
Add field output_format to first Result sent in gRPC protocol.
2022-02-10 21:05:08 +07:00
Dmitry Novik
d405523598
Fix ProfileEvents sending in INSERT SELECT
2022-02-10 13:27:27 +00:00
Kruglov Pavel
738355b724
Merge pull request #34408 from vitlibar/split-and-rename-compression-fields-in-grpc
...
Split and rename compression fields in gRPC
2022-02-10 15:40:20 +03:00
Anton Popov
298838f891
avoid unnecessary copying of Settings
2022-02-10 12:13:51 +03:00
Vitaly Baranov
1341b4b4de
Rename QueryInfo's field result_compression -> transport_compression_type and change its type for better consistency.
...
Make the previous field obsolete.
2022-02-10 02:46:05 +07:00
Vitaly Baranov
1f6b65d39d
gRPC: Split compression_type field into input_compression_type and output_compression_type.
...
Make the previous field obsolete.
2022-02-10 02:46:05 +07:00
Vitaly Baranov
b2ba0c4320
Fix inserting to temporary tables via gRPC.
2022-02-07 12:36:17 +07:00
Vitaly Baranov
5dd49a44e6
Add test for propagating OpenTelemetry context via gRPC protocol.
2022-02-06 02:09:56 +07:00
alexey-milovidov
665fdc9187
Merge pull request #31257 from FArthur-cmd/merge_15765
...
Merge #15765
2022-02-04 00:39:57 +03:00
alexey-milovidov
4742cf3074
Update CertificateReloader.cpp
2022-02-03 03:03:46 +03:00
Azat Khuzhin
5472aef084
Fix current_user/current_address for interserver mode
...
Before this patch current_user/current_address will be preserved from
the previous query.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-02 17:44:19 +03:00
Sergei Trifonov
68bc456830
Merge pull request #34223 from azat/bump-fmt
...
Bump fmtlib from 7.0.0 to 8.1.1
2022-02-02 00:03:25 +03:00
Vitaly Baranov
2ef2479ddc
Add const to make clang-tidy happy
2022-02-01 18:38:52 +07:00
Azat Khuzhin
de80014eb5
Use fmt::format over Poco::format in PostgreSQLHandler
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:04 +03:00
Azat Khuzhin
bedf208cbd
Use fmt::runtime() for LOG_* for non constexpr
...
Here is oneliner:
$ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'
Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:
$ cat fmt.cocci
@@
expression log;
expression var;
@@
-LOG_DEBUG(log, var)
+LOG_DEBUG(log, fmt::runtime(var))
I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
FArthur-cmd
3dc64f031a
correct code style
2022-01-31 12:21:22 +00:00
FArthur-cmd
891411a2be
add try catch to avoid errors on start
2022-01-31 12:13:28 +00:00
Andre Marianiello
f5cbc6da43
Propagate trace context from GRPC calls
2022-01-28 14:27:04 -05:00
FArthur-cmd
cb4ad97d45
add test
2022-01-28 17:37:52 +00:00
Filatenkov Artur
82b0fc0bd0
Merge branch 'master' into merge_15765
2022-01-24 13:38:53 +03:00
alesapin
5ec76cd827
Merge branch 'master' into better_hashmap
2022-01-21 12:47:41 +03:00
Azat Khuzhin
6acb4d6ac5
Remove unbundled gRPC support
2022-01-20 08:47:16 +03:00
Nikita Mikhaylov
e3de3889e3
Revert "Revert "Ignore parse failure of opentelemetry header ( #32116 )" ( #33594 )" ( #33595 )
2022-01-19 20:53:39 +03:00