Commit Graph

2156 Commits

Author SHA1 Message Date
HarryLeeIBM
3639ecfc56 Fix Endian issue in BitHelpers 2022-07-27 06:56:04 -07:00
alesapin
2dfb547847
Merge pull request #39054 from SmitaRKulkarni/add-option-for-outfile-to-print-stdout
Add an option to INTO OUTFILE to also print details to standard output.
2022-07-27 13:51:38 +02:00
Kruglov Pavel
381ea139c2
Merge branch 'master' into schema-inference-cache 2022-07-27 11:35:36 +02:00
Kseniia Sumarokova
7d448fc177
Merge pull request #39244 from kssenii/http-buffer-small-fixes
Some small fixes for http read buffer, allow to retry partial content in case of 200ok
2022-07-26 14:47:11 +03:00
Raúl Marín
6e3a4b0a3d Add result_rows and result_bytes to progress reports and summary 2022-07-26 10:40:16 +02:00
Kseniia Sumarokova
9abbb35cda
Fix integration test 2022-07-25 23:40:23 +03:00
Alexey Milovidov
388d06fda1
Merge pull request #39535 from ClickHouse/stringref
Less usage of StringRef
2022-07-25 04:06:11 +03:00
Robert Schulze
4333750985
Less usage of StringRef
... replaced by std::string_view, see #39262
2022-07-24 18:33:52 +00:00
Alexey Milovidov
a897c263f0
Merge branch 'master' into http-buffer-small-fixes 2022-07-24 01:46:10 +03:00
mergify[bot]
0933dd7904
Merge branch 'master' into add-option-for-outfile-to-print-stdout 2022-07-23 19:50:10 +00:00
Kseniia Sumarokova
77ddb8eda0
Merge pull request #39506 from CurtizJ/fix-direct-io
Fix reading from async read buffer with direct io
2022-07-23 06:08:48 +02:00
Anton Popov
c1a5514e46 fix reading from async read buffer with direct io 2022-07-22 16:58:30 +00:00
Alexander Tokmakov
bed2206ae9
Merge pull request #39460 from ClickHouse/remove_some_dead_and_commented_code
Remove some dead and commented code
2022-07-22 13:24:34 +03:00
Kruglov Pavel
9252f42b4c
Merge branch 'master' into schema-inference-cache 2022-07-21 18:59:14 +02:00
Robert Schulze
ea0a3bf600
Merge branch 'master' into stringref-to-string_view 2022-07-21 18:33:06 +02:00
Alexander Tokmakov
a8da5d96fc remove some dead and commented code 2022-07-21 15:05:48 +02:00
Nikolai Kochetov
91043351aa Fixing build. 2022-07-20 20:30:16 +00:00
Smita Kulkarni
605fc5f121 Addressed review comments
- Added finalizeImpl() override in ForkWriteBuffer to call finalize() of all the buffers.
- Removed clearing buffer in ForkWriteBuffer destructor.
2022-07-20 21:02:54 +02:00
Kruglov Pavel
3046cd6d29
Merge branch 'master' into schema-inference-cache 2022-07-20 13:30:42 +02:00
Robert Schulze
df53a556eb
Fix test failures 2022-07-20 07:59:02 +00:00
kssenii
21ebf8874e Merge remote-tracking branch 'upstream/master' into make-cache-composable 2022-07-19 13:36:42 +02:00
Robert Schulze
81ef1099cc
Even less usage of StringRef
--> see #39300
2022-07-19 07:01:06 +00:00
Smita Kulkarni
8b523bec16 Addressed review comments
- Updated destructor of ForkWriteBuffer to clear buffer
2022-07-18 22:12:26 +02:00
kssenii
0aed5a602a Merge master 2022-07-18 16:16:28 +02:00
kssenii
274457e5cf Allow cache over azure blob storage, add tests 2022-07-18 16:15:04 +02:00
Smita Kulkarni
228b9e7ec4 Addressed review comments
- Updated exception message in ForkWriteBuffer
- Added test case to tests/queries/0_stateless/02346_into_outfile_and_stdout.sh for calling nextImpl more than once
2022-07-17 20:09:18 +02:00
Robert Schulze
13482af4ee
First try at reducing the use of StringRef
- to be replaced by std::string_view
- suggested in #39262
2022-07-17 17:26:02 +00:00
kssenii
3ccbf5ced0 Review fixes 2022-07-17 15:13:28 +02:00
kssenii
8ad26b3111 Merge master 2022-07-16 22:50:03 +02:00
Smita Kulkarni
6318927fba addressed review comment: ForkWriteBuffer for loop 2022-07-15 18:37:50 +02:00
Smita Kulkarni
d7fc7a4290 Addressed review comments
- Removed first_buffer, finalizeImpl and logic to different buffer size from ForkWriteBuffer
2022-07-15 16:08:53 +02:00
kssenii
a06fe4e21b Fix 2022-07-15 13:53:20 +02:00
Robert Schulze
deda29b46b
Pass const StringRef by value, not by reference
See #39224
2022-07-15 11:34:56 +00:00
Kruglov Pavel
a944a92d4c
Merge pull request #39224 from Avogar/string-view-by-value
Pass const std::string_view by value, not by reference
2022-07-15 13:05:56 +02:00
Smita Kulkarni
5a8d6ba0fc clang tidy feedback addressed: updated src/IO/ForkWriteBuffer.cpp to use const reference 2022-07-15 09:06:25 +02:00
Smita Kulkarni
1dc2187f9c Addressed review comments
Implementation:
- Added a new buffer ForkWriteBuffer takes a vector of WriteBuffer and writes data to all of them. It uses the buffer of the first element as its buffer and copies data from first buffer to all the other buffers
Testing:
- Updated tests/queries/0_stateless/02346_into_outfile_and_stdout.sh
Documentation:
- Updated the english documentation for SELECT.. INTO OUTFILE with AND STDOUT.
2022-07-14 22:47:38 +02:00
kssenii
03897589b9 Fix 2022-07-14 21:31:17 +02:00
avogar
9291d33080 Pass const std::string_view & by value, not by reference 2022-07-14 16:11:57 +00:00
Sergei Trifonov
b2317ff710 renaming to be consistent 2022-07-14 17:33:22 +02:00
Azat Khuzhin
a068c397df Do not report "Failed communicating with" on and on for parts exchange
For parts exchange right now an error message in stored in the
HTTPSession, via HTTPSession::attachSessionData(), and for each request
this HTTPSession::sessionData() is checked and if not empty printed into
the log.

However it should be reported only once, otherwise you will get this
message on and on, even for different tables. Here is an example of such
messages:

    2022.07.13 07:56:09.342997 [ 683 ] {} <Error> test_juq8qk.rmt2 (ede90518-4710-48bb-ab43-caf0b1b157f4): auto DB::StorageReplicatedMergeTree::processQueueEntry(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator()(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: Code: 86. DB::Exception: Received error from remote server /?endpoint=DataPartsExchange%3A%2Ftest%2F01165%2Ftest_juq8qk%2Frmt%2Freplicas%2F1&part=206--1406300905-20220713-1657673769_0_0_0&client_protocol_version=7&compress=false&remote_fs_metadata=s3. HTTP status code: 500 Internal Server Error, body: Code: 236. DB::Exception: Transferring part to replica was cancelled. (ABORTED) (version 22.7.1.1781 (official build)). (RECEIVED_ERROR_FROM_REMOTE_IO_SERVER), Stack trace (when copying this message, always include the lines below):
    # this is the time when this message is written ^
    2022.07.13 07:56:10.528554 [ 814 ] {} <Information> DatabaseCatalog: Removing metadata /var/lib/clickhouse/metadata_dropped/test_juq8qk.rmt2.ede90518-4710-48bb-ab43-caf0b1b157f4.sql of dropped table test_juq8qk.rmt2 (ede90518-4710-48bb-ab43-caf0b1b157f4)
    # now this table had been removed ^
    2022.07.13 07:56:27.442003 [ 683 ] {} <Debug> test_1orbeb.mutations_and_quorum2 (bc811afd-1f57-4f9c-a04d-9e1e1b60e891): Fetching part 201901_0_0_0 from /clickhouse/tables/test_1orbeb/test_01090/mutations_and_quorum/replicas/1
    # here fetch part is scheduled for another table ^
    2022.07.13 07:56:27.442213 [ 683 ] {} <Trace> HTTPCommon: Failed communicating with 250c6af4615d with error 'Received error from remote server /?endpoint=DataPartsExchange%3A%2Ftest%2F01165%2Ftest_juq8qk%2Frmt%2Freplicas%2F1&part=255--1372061156-20220713-1657673769_0_0_0&client_protocol_version=7&compress=false&remote_fs_metadata=s3. HTTP status code: 500 Internal Server Error, body: Code: 236. DB::Exception: Transferring part to replica was cancelled. (ABORTED) (version 22.7.1.1781 (official build))' will try to reconnect session
    # however it still reports an error for the already removed table test_juq8qk.rmt
    2022.07.13 07:56:27.442246 [ 683 ] {} <Trace> ReadWriteBufferFromHTTP: Sending request to http://250c6af4615d:9009/?endpoint=DataPartsExchange%3A%2Fclickhouse%2Ftables%2Ftest_1orbeb%
    # but this is just a noisy message and it still doing the job correctly ^

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-14 15:17:15 +03:00
Kruglov Pavel
b38241b08a
Merge branch 'master' into schema-inference-cache 2022-07-14 12:29:54 +02:00
Sergei Trifonov
af4a5a5f3a fix conflicts 2022-07-13 19:44:29 +02:00
Sergei Trifonov
f854507729 merge master and resolve conflicts 2022-07-13 19:07:28 +02:00
Sergei Trifonov
60c6a5b23c fix s3 read/write throttling instant 2022-07-13 18:36:08 +02:00
kssenii
0d2d3ac2b4 Merge master 2022-07-13 13:26:15 +02:00
kssenii
6f29eada80 Merge master 2022-07-12 19:28:18 +02:00
Robert Schulze
1a7727a254
Prefix overridden add_executable() command with "clickhouse_"
A simple HelloWorld program with zero includes except iostream triggers
a build of ca. 2000 source files. The reason is that ClickHouse's
top-level CMakeLists.txt overrides "add_executable()" to link all
binaries against "clickhouse_new_delete". This links against
"clickhouse_common_io", which in turn has lots of 3rd party library
dependencies ... Without linking "clickhouse_new_delete", the number of
compiled files for "HelloWorld" goes down to ca. 70.

As an example, the self-extracting-executable needs none of its current
dependencies but other programs may also benefit.

In order to restore access to the original "add_executable()", the
overriding version is now prefixed. There is precedence for a
"clickhouse_" prefix (as opposed to "ch_"), for example
"clickhouse_split_debug_symbols". In general prefixing makes sense also
because overriding CMake commands relies on undocumented behavior and is
considered not-so-great practice (*).

(*) https://crascit.com/2018/09/14/do-not-redefine-cmake-commands/
2022-07-11 19:36:18 +02:00
Sergei Trifonov
6ed777d2a8 add azure support 2022-07-11 19:19:57 +02:00
Sergei Trifonov
43779ec280 add max_remote_{read,write}_network_bandwidth_for_server settings 2022-07-11 14:59:39 +02:00
kssenii
bf1c99daab Refactoring of object storages, add LocalObjectStorage 2022-07-09 12:39:31 +02:00
Smita Kulkarni
c7967fb721 Add an option to INTO OUTFILE to also print details to standard output.
Implementation:
- Added a bool to ASTQueryWithOutput & patched the usage in ClientBase.
- Added a new buffer TeeWriteBuffer which extends from WriteBufferFromFile (used to write data to the file) and has WriteBufferFromFileDescriptor (used to write data to stdout). The WriteBufferFromFileDescriptor uses the same buffer as TeeWriteBuffer.
- Added a new bool select_into_outfile_and_stdout in ClientBase to enable/disable progress rendering.

Testing:
 - Added a test tests/queries/0_stateless/02346_into_outfile_and_stdout.sh

Documentation:
- Updated the english documentation for the new option in SELECT.
2022-07-09 10:12:46 +02:00
Nikolay Degterinsky
0c783800c8 Better 2022-07-07 01:47:33 +00:00
kssenii
e55169ebad Fix 2022-07-05 20:15:35 +02:00
Kseniia Sumarokova
b3fd8e3bd6
Merge pull request #38802 from kssenii/fix-s3-seekable-with-parallel
Fix s3 seekable reads with parallel read buffer
2022-07-05 11:23:16 +02:00
kssenii
b52084265c Merge master 2022-07-04 21:37:43 +02:00
kssenii
f5bf744028 Fix 2022-07-04 16:05:08 +02:00
kssenii
a772a09149 Fix 2022-07-04 00:14:45 +02:00
Robert Schulze
bb441faa42
Merge pull request #38491 from ClickHouse/clang-tidy-in-branches
Fix some clang-tidy warnings in headers
2022-06-29 10:22:04 +02:00
Robert Schulze
f692ead6ad
Don't use std::unique_lock unless we have to
Replace where possible by std::lock_guard which is more light-weight.
2022-06-28 19:19:06 +00:00
Robert Schulze
3e528c0385
Fix duplicate include 2022-06-28 08:13:51 +00:00
Robert Schulze
5e28580f11
Fix some clang-tidy warnings in headers 2022-06-27 23:49:07 +02:00
Kruglov Pavel
86e8f31ad4
Merge branch 'master' into schema-inference-cache 2022-06-24 16:10:25 +02:00
Alexander Tokmakov
cfe0e434e5
Revert "Add support for io_uring read method" 2022-06-24 12:19:41 +03:00
Alexey Milovidov
812ab9bd6b
Merge pull request #36103 from sauliusvl/uring
Add support for io_uring read method
2022-06-24 00:34:29 +03:00
Alexander Tokmakov
74f38710a8 Merge branch 'master' into cleanup_garbage_in_store_dir 2022-06-23 21:43:28 +02:00
kssenii
f7b329ee57 Merge master 2022-06-23 14:56:48 +02:00
alesapin
0f8eed98c4
Merge branch 'master' into better-support-gcp 2022-06-22 12:46:01 +02:00
kssenii
4178abc0a5 Merge master 2022-06-21 22:38:51 +02:00
avogar
c14364e3d9 Check last modification time for URL function too 2022-06-21 17:18:14 +00:00
avogar
d37ad2e6de Implement cache for schema inference for file/s3/hdfs/url 2022-06-21 13:02:48 +00:00
Alexander Tokmakov
ba0fcec993 add background cleanup of store/ subdirs 2022-06-21 12:35:47 +02:00
Saulius Valatka
0dc7854af1 add initial io_uring support 2022-06-21 09:59:46 +03:00
Kseniia Sumarokova
2d039b739c
Update ReadBufferFromFileDescriptor.cpp 2022-06-20 19:13:20 +02:00
kssenii
cea81822bd Fix 2022-06-20 17:19:36 +02:00
kssenii
5dd1bb2fd8 improvements for getFileSize 2022-06-20 15:22:56 +02:00
kssenii
90be49faa4 Merge master 2022-06-20 14:26:56 +02:00
Vitaly Baranov
06c4082a7c
Merge pull request #37358 from vitlibar/backup-improvements-6
Backup Improvements 6
2022-06-20 14:13:30 +02:00
Alexey Milovidov
7700c26076
Merge pull request #38196 from ClickHouse/revert-38194-revert-37015-zstd_window_log_max
Revert "Revert "Add a setting to use more memory for zstd decompression""
2022-06-19 19:58:03 +03:00
Alexey Milovidov
04b7a34870 Maybe fix error 2022-06-19 05:21:59 +02:00
Alexey Milovidov
73709b0488
Revert "Revert "Add a setting to use more memory for zstd decompression"" 2022-06-18 15:55:35 +03:00
alesapin
16e8b85fbf
Revert "Add a setting to use more memory for zstd decompression" 2022-06-18 14:08:14 +02:00
Alexey Milovidov
e20259e9ca
Merge pull request #37015 from wuxiaobai24/zstd_window_log_max
Add a setting to use more memory for zstd decompression
2022-06-18 04:19:27 +03:00
alesapin
1c7a7da487
Merge pull request #38088 from kssenii/diff-with-cache
Extract some diff from pr #36171
2022-06-17 12:07:31 +02:00
mergify[bot]
296905771f
Merge branch 'master' into better-support-gcp 2022-06-17 01:19:11 +00:00
kssenii
797482f132 Better 2022-06-16 16:40:29 +02:00
mergify[bot]
7f24574609
Merge branch 'master' into better-support-gcp 2022-06-15 23:18:20 +00:00
Vitaly Baranov
e891eba80e Finalize write buffers used in backups. 2022-06-15 20:26:27 +02:00
Daniel Kutenin
a769dea8ef
Merge branch 'ClickHouse:master' into master 2022-06-15 19:12:10 +01:00
Danila Kutenin
048f56bf4d Fix some tests and comments 2022-06-15 14:40:21 +00:00
kssenii
500f49972b Extract diff from PR 36171 2022-06-15 16:40:18 +02:00
Danila Kutenin
08e3f77a9c Optimize most important parts with NEON SIMD
First part, updated most UTF8, hashing, memory and codecs. Except
utf8lower and upper, maybe a little later.

That includes huge amount of research with movemask dealing. Exact
details and blog post TBD.
2022-06-15 13:19:29 +00:00
mergify[bot]
12bd2c0e3f
Merge branch 'master' into dt64-neg-subseconds 2022-06-15 02:24:17 +00:00
Anton Popov
a59be0fd5d better support of GCP storage 2022-06-15 00:23:45 +00:00
kssenii
4813b90281 Merge master 2022-06-13 21:32:00 +02:00
kssenii
82629cc2be Continue 2022-06-13 16:32:07 +02:00
alesapin
eae10aab6d
Merge pull request #37964 from excitoon-favorites/betterurlhandlingforversionid
Better parsing of `versionId` in `S3::URI::URI`
2022-06-12 13:12:02 +02:00
kssenii
aaf9a46f07 Merge master 2022-06-11 15:56:05 +02:00
Kseniia Sumarokova
580a30c6ae
Merge pull request #37859 from KinderRiven/support_max_request_cache_size
Support to set max cache size for per query in local cache
2022-06-10 16:17:18 +02:00
Kseniia Sumarokova
0ae2168fb6
Merge pull request #36328 from bigo-sg/async_hdfs_read_buffer
Apply read_method 'threadpool' for StorageHive
2022-06-10 15:04:21 +02:00
Robert Schulze
5f5732a2c4
Merge pull request #37969 from ClickHouse/consistent-macro-usage
More consistent use of platform macros
2022-06-10 14:10:01 +02:00
kssenii
0fd2c4b2c0 Continuation 2022-06-10 12:33:29 +02:00
Robert Schulze
1a0b5f33b3
More consistent use of platform macros
cmake/target.cmake defines macros for the supported platforms, this
commit changes predefined system macros to our own macros.

__linux__ --> OS_LINUX
__APPLE__ --> OS_DARWIN
__FreeBSD__ --> OS_FREEBSD
2022-06-10 10:22:31 +02:00
Vladimir Chebotarev
512f16f5fa Better parsing of versionId in S3::URI::URI. 2022-06-10 10:06:31 +03:00
Vladimir Chebotarev
3b344a3d26
Got rid of S3AuthSigner (#37769) 2022-06-09 14:44:50 +02:00
KinderRiven
6883ecda96 fix 2022-06-08 14:19:50 +08:00
Azat Khuzhin
71285edfbd Fix reading of empty S3 files
It is possible for ReadBufferFromS3::nextImpl() called even after eof(),
at least once, and in this case, if the file was empty, then local
working_buffer will be null, while impl.working_buffer will be empty,
but not null, and so local position() after impl->position() =
position() will be incorrect.

I found this with test_storage_s3/test.py::test_empty_file in debug
build, assertion catched this, so maybe it worth get back debug
integration build...

v2: fix test_log_family_s3 failures
    https://s3.amazonaws.com/clickhouse-test-reports/37801/b5e6e2ddae94d6a7eac551309cb67003dff97df1/integration_tests__asan__actions__[2/3].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-07 20:41:26 +03:00
taiyang-li
73a484256e Merge branch 'master' into async_hdfs_read_buffer 2022-06-07 12:16:46 +08:00
KinderRiven
3b2a427002 fix 2022-06-07 11:50:56 +08:00
taiyang-li
b36d9f8143 refactor readinto 2022-06-06 12:58:22 +08:00
KinderRiven
13e74bef5e support skip_download_if_exceeds_query_cache 2022-06-06 02:36:23 +08:00
KinderRiven
3ffb0b3549 support_max_query_cache_size 2022-06-05 16:21:36 +08:00
kssenii
f41621736d Fixes 2022-06-03 17:03:05 +02:00
Alexander Tokmakov
084dd6f3c2
Merge pull request #37767 from excitoon-favorites/removeperrequestconfigurationfromawssdkcpp
Moved `ClientConfigurationPerRequest` to ClickHouse
2022-06-03 17:42:50 +03:00
zvonand
e6498a3235 update comment 2022-06-03 14:52:34 +03:00
taiyang-li
f202c35311 Merge branch 'master' into async_hdfs_read_buffer 2022-06-03 17:52:09 +08:00
kssenii
3d85391195 Better 2022-06-02 18:00:13 +02:00
kssenii
92a799a0c4 Add ObjectStorageProxy, CachedObjectStorage 2022-06-02 16:45:21 +02:00
Kruglov Pavel
37a4d11c64
Merge pull request #37645 from azat/fix-write
Fix possible "Cannot write to finalized buffer"
2022-06-02 14:01:30 +02:00
Antonio Andelic
46abbac352
Merge pull request #37726 from ClickHouse/fix-parallel-download-exception
Initialize `ParallelReadBuffer` after construction
2022-06-02 12:35:10 +02:00
Vladimir Chebotarev
a857bc2ccf
Update S3Common.cpp 2022-06-02 08:46:41 +03:00
Vladimir Chebotarev
5fcf840156
Typo. 2022-06-02 08:43:44 +03:00
Vladimir Chebotarev
d5022a0c01 Moved ClientConfigurationPerRequest from ClickHouse/aws-sdk-cpp#1 and ClickHouse/aws-sdk-cpp#2 to ClickHouse. 2022-06-02 06:07:01 +03:00
Azat Khuzhin
62d78d8f20 Fix WriteBufferFromS3 is_finalized check in case of exception
WriteBufferFromS3::is_finalized is not set if finalizeImpl() throws,
while WriteBuffer::finalized correctly set even in case of exception, so
it should be used instead.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-01 21:50:30 +03:00
Antonio Andelic
08c20be4d0 Cleaner exception handling in ParallelReadBuffer 2022-06-01 11:51:01 +00:00
Antonio Andelic
f49dd19e7a Revert "Initialize ParallelReadBuffer after construction"
This reverts commit 31e1e67836.
2022-06-01 11:43:58 +00:00
Antonio Andelic
31e1e67836 Initialize ParallelReadBuffer after construction 2022-06-01 06:25:32 +00:00
zvonand
8e28ba2583 fix DT64 reader 2022-05-31 18:15:51 +03:00
kssenii
372709db53 Add test 2022-05-30 21:32:49 +02:00
kssenii
bfbc0e3184 Better, important fixes 2022-05-30 20:35:31 +02:00
taiyang-li
dbb8a09825 merge master and solve conflict 2022-05-30 10:47:04 +08:00
kssenii
25b1ed526d Merge master 2022-05-27 16:50:45 +02:00
kssenii
b78455168e Continuation 2022-05-27 16:25:33 +02:00
alesapin
6d6779f17a
Merge pull request #37139 from ClickHouse/i_object_storage
Separate object storage operations from disks
2022-05-27 13:59:50 +02:00
Alexey Milovidov
8ba865bb60
Merge pull request #37344 from excitoon-favorites/fixs3colonandequalssign
Fixed error with symbols in key name in S3
2022-05-27 00:58:35 +03:00
kssenii
cbb93fa0ce Continuation 2022-05-26 18:54:59 +02:00
kssenii
b89a4edc04 Merge master 2022-05-25 20:55:04 +02:00
alesapin
6f5c86e55e Merge branch 'master' into i_object_storage 2022-05-25 20:49:01 +02:00
kssenii
0dbc09ef17 Continuation 2022-05-25 20:28:46 +02:00
kssenii
0556237b68 Continuation 2022-05-25 16:49:40 +02:00
taiyang-li
1d9f65a7d4 Merge branch 'master' into async_hdfs_read_buffer 2022-05-25 17:10:22 +08:00
Alexey Milovidov
516fba27dc Merge branch 'master' into allow-setuid-inside-clickhouse 2022-05-24 23:31:14 +02:00
kssenii
35d2dec8d5 Fix 2022-05-24 16:15:55 +02:00
Kruglov Pavel
6c9a524f6b
Merge pull request #37192 from Avogar/formats-with-names
Improve performance and memory usage for select of subset of columns for some formats
2022-05-24 13:28:14 +02:00
李扬
e33cfc889c
Fix bug of datetime64 parsed from string '1969-12-31 23:59:59.123' (#37039) 2022-05-24 10:47:17 +02:00
mergify[bot]
51ff49a0ee
Merge branch 'master' into i_object_storage 2022-05-23 20:29:49 +00:00
alesapin
1e1e6d4fa0 Review fixes 2022-05-23 16:24:06 +02:00
alesapin
216184dfd3 Rename one more file 2022-05-23 13:20:32 +02:00
taiyang-li
14f84f02d5 Merge branch 'master' into async_hdfs_read_buffer 2022-05-23 18:36:21 +08:00
Kruglov Pavel
f539fb835d
Merge branch 'master' into formats-with-names 2022-05-23 12:14:20 +02:00
Alexey Milovidov
c541d30a38 Fix error 2022-05-23 02:48:05 +02:00
Alexey Milovidov
cc985d9b92 Fix error 2022-05-23 02:30:33 +02:00
kssenii
9aa20193d5 Merge master 2022-05-22 00:56:20 +02:00
kssenii
ffd8d9723a Continuation 2022-05-22 00:21:40 +02:00
avogar
a4cf07708c Fix comments 2022-05-20 14:57:27 +00:00
avogar
566d1b15fd Merge branch 'master' of github.com:ClickHouse/ClickHouse into formats-with-names 2022-05-20 13:54:52 +00:00
avogar
a6a430c5ee Merge branch 'master' of github.com:ClickHouse/ClickHouse into json-columns-formats 2022-05-20 11:08:30 +00:00
alesapin
654b27e307 Merge branch 'master' into i_object_storage 2022-05-20 11:56:13 +02:00
Vladimir Chebotarev
cdbe6672cb Added one more symbol and proper comment. 2022-05-20 11:35:18 +03:00
alesapin
c87c3fcfd9 Move Azure blob storage 2022-05-19 19:25:45 +02:00
Vladimir Chebotarev
1ad19051e5 Fixed error with symbols in key name in S3. 2022-05-19 11:01:05 +03:00
Nikolai Kochetov
64ecb3941c
Merge pull request #37259 from ClickHouse/clangtidies2
Activate more clangtidies
2022-05-18 13:01:40 +02:00
alesapin
e99c90118e Merge branch 'master' into i_object_storage 2022-05-18 12:36:22 +02:00
Kseniia Sumarokova
38c87ab9cd
Merge pull request #36493 from kssenii/fix-encrypted-buffer
Fix offset update ReadBufferFromEncryptedFile
2022-05-18 09:46:17 +02:00
Robert Schulze
0c55ac76d2
A few clangtidy updates
Enable:

- bugprone-lambda-function-name: "Checks for attempts to get the name of
  a function from within a lambda expression. The name of a lambda is
  always something like operator(), which is almost never what was
  intended."

- bugprone-unhandled-self-assignment: "Finds user-defined copy
  assignment operators which do not protect the code against
  self-assignment either by checking self-assignment explicitly or using
  the copy-and-swap or the copy-and-move method.""

- hicpp-invalid-access-moved: "Warns if an object is used after it has
  been moved."

- hicpp-use-noexcept: "This check replaces deprecated dynamic exception
  specifications with the appropriate noexcept specification (introduced
  in C++11)"

- hicpp-use-override: "Adds override (introduced in C++11) to overridden
  virtual functions and removes virtual from those functions as it is
  not required."

- performance-type-promotion-in-math-fn: "Finds calls to C math library
  functions (from math.h or, in C++, cmath) with implicit float to
  double promotions."

Split up:

- cppcoreguidelines-*. Some of them may be useful (haven't checked in
  detail), therefore allow to toggle them individually.

Disable:

- linuxkernel-*. Obvious.
2022-05-17 20:56:57 +02:00
kssenii
e4e6e44e86 Merge master 2022-05-17 15:47:33 +02:00
kssenii
b53ca506e6 Add unit test 2022-05-17 14:55:42 +02:00
alesapin
4d4634b12d
Merge pull request #37164 from kssenii/ficx-async-reads-assertions
fix async reads from remote fs internal setting not being always turned on
2022-05-17 11:29:14 +02:00
taiyang-li
14ab7eb5a3 merge master and solve conflict 2022-05-17 16:28:08 +08:00
kssenii
6a51dea791 Merge master 2022-05-16 22:13:22 +02:00
alesapin
ceb7249916 Fix stupid buge 2022-05-16 19:57:48 +02:00
alesapin
ce6d5f7dcc Merge branch 'master' into i_object_storage 2022-05-16 17:42:22 +02:00
kssenii
f7493965b7 Remove additional check for merge tree 2022-05-16 11:19:57 +02:00
Robert Schulze
e3cfec5b09
Merge remote-tracking branch 'origin/master' into clangtidies 2022-05-16 10:12:50 +02:00
alesapin
4f1d4dde22 Disable s3 logging by default 2022-05-16 00:16:00 +02:00
kssenii
646cf4cc95 Better 2022-05-14 14:26:04 +02:00
Kseniia Sumarokova
f4a8a0cefe
Merge pull request #37200 from kssenii/add-s3-requests-metric
Add S3Requests metric
2022-05-14 10:08:21 +02:00
alesapin
cc304a3178 Merge branch 'master' into i_object_storage 2022-05-13 23:44:00 +02:00
avogar
68bb07d166 Better naming 2022-05-13 18:39:19 +00:00
kssenii
58faaf0ea3 Merge master 2022-05-13 18:51:07 +02:00
kssenii
5dd3ad08a1 Add S3Requests metric 2022-05-13 18:12:46 +02:00
Kruglov Pavel
4549d2f40f
Fix build 2022-05-13 17:41:26 +02:00
kssenii
d8ec49d9b3 Fix 2022-05-13 17:17:13 +02:00
avogar
febabb2787 Fix build 2022-05-13 15:08:02 +00:00
kssenii
0870b9376c Fix 2022-05-13 16:30:59 +02:00
avogar
cef13c2c02 Allow to skip unknown columns in Native format 2022-05-13 14:27:15 +00:00
avogar
b17fec659a Improve performance and memory usage for select of subset of columns for some formats 2022-05-13 13:51:28 +00:00
Nikolai Kochetov
b2c363a38a
Merge pull request #37157 from ClickHouse/try-enable-cache-for-https-session
Enable DNS cache for HTTPSClientSession.
2022-05-13 15:42:30 +02:00
wuxiaobai24
f3e573bfde Merge remote-tracking branch 'upstream/master' into zstd_window_log_max 2022-05-13 20:42:54 +08:00
mergify[bot]
4a661b6e78
Merge branch 'master' into json-columns-formats 2022-05-13 11:32:03 +00:00
wuxiaobai24
ab5636a46a fix 2022-05-13 17:52:39 +08:00
Kseniia Sumarokova
320efb2221
Merge branch 'master' into better-read-from-cache 2022-05-12 23:35:39 +02:00
Kseniia Sumarokova
3fd9517ff8
Merge pull request #37130 from ClickHouse/kssenii-patch-3
Update default remote fs read method in ReadSettings
2022-05-12 23:34:28 +02:00
Nikolai Kochetov
f8bd4fa0f0 Remove old comment. 2022-05-12 15:24:36 +00:00
Nikolai Kochetov
77fb1b84ac Enable DNS cache for HTTPSClientSession. 2022-05-12 15:21:29 +00:00
kssenii
483e056bcc Merge master 2022-05-12 14:58:24 +02:00
Kseniia Sumarokova
59bfcd917b
Merge pull request #36876 from kssenii/extend-cache-log
Log into filesystem_cache_log when cache not even attempted
2022-05-12 12:38:36 +02:00
Kseniia Sumarokova
2a4f763a5e
Merge pull request #37075 from kssenii/fix-progress-for-insert-select
Fix progress indication for `INSERT SELECT` in clickhouse-local and for file progress in client
2022-05-12 12:05:53 +02:00
alesapin
5dcd25be23 Initial implementation 2022-05-12 00:04:54 +02:00
Kseniia Sumarokova
cf96f3ce3f
Update Progress.cpp 2022-05-11 22:52:30 +02:00
Kseniia Sumarokova
ec4955f157
Update ReadSettings.h 2022-05-11 18:32:31 +02:00
kssenii
c84e0d13fa Fix test 2022-05-11 14:36:34 +02:00
kssenii
61f2737e17 Merge master 2022-05-10 19:31:22 +02:00
wuxiaobai24
85356bbf64 fix 2022-05-11 00:53:09 +08:00
kssenii
f4b45a5805 Better profile events 2022-05-10 16:00:53 +02:00
kssenii
0feda67ec4 Fix progress for insert select 2022-05-10 15:04:08 +02:00
avogar
f6b16880bd Merge branch 'master' of github.com:ClickHouse/ClickHouse into json-columns-formats 2022-05-10 12:57:18 +00:00
mergify[bot]
2c911da020
Merge branch 'master' into dont_finalize_s3_buffer 2022-05-10 11:26:51 +00:00
kssenii
2f0f76369a Better 2022-05-09 21:25:26 +02: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
wuxiaobai24
58755cb156 add zstd_window_log_max setting 2022-05-08 14:02:40 +08:00
Alexey Milovidov
4eac661588
Merge branch 'master' into master 2022-05-07 13:21:59 +03:00
avogar
62a7ba3f26 Add columnar JSON formats 2022-05-06 16:48:48 +00:00
kssenii
fd1ab053f8 Merge master 2022-05-06 12:50:33 +02:00
mergify[bot]
9ce436733f
Merge branch 'master' into fix-current-size-count-in-cache 2022-05-05 17:33:56 +00:00
kssenii
0117fd40a6 Review fixes 2022-05-05 17:39:36 +02:00
Kseniia Sumarokova
224ab38b65
Merge pull request #36801 from ClickHouse/parallel-url-threads
Use mutex per worker in ParallelReadBuffer
2022-05-05 16:36:55 +02:00
Alexander Gololobov
7e3a805ae3
Merge pull request #36572 from ClickHouse/fix-trash-s3-metrics
Everything related to S3 metrics was not good
2022-05-05 11:44:02 +02:00
alesapin
b76406fc8f
Merge pull request #36910 from ClickHouse/add_test
Fix bug in keeper which could lead to corrupted compressed logs
2022-05-04 23:44:45 +02:00
Alexander Tokmakov
e30365a531
Merge pull request #36872 from ClickHouse/fix_exception_message
Add extra info when sending exception
2022-05-04 23:24:47 +03:00
Kruglov Pavel
77e55c344c
Merge pull request #36667 from Avogar/mysqldump-format
Add MySQLDump input format
2022-05-04 19:49:48 +02:00
alesapin
63f15368ff Remove unused header 2022-05-04 18:30:23 +02:00
alesapin
c09825919b Better comments 2022-05-04 18:24:28 +02:00
alesapin
c6556da5fc Fix bug which can lead to corrupted logs in compressed format 2022-05-04 18:08:00 +02:00
mergify[bot]
e0fa563092
Merge branch 'master' into fix_exception_message 2022-05-04 15:56:03 +00:00
mergify[bot]
6ecddf4077
Merge branch 'master' into fix-trash-s3-metrics 2022-05-04 10:14:29 +00:00
Antonio Andelic
29e0edd49f Unlock mutex before destroying worker 2022-05-04 06:30:54 +00:00
Antonio Andelic
056fac9aef Merge branch 'master' into parallel-url-threads 2022-05-04 06:26:56 +00:00
mergify[bot]
64084b5e32
Merge branch 'master' into shared_ptr_helper3 2022-05-03 20:46:16 +00:00
kssenii
0266cdf125 Add entries to cache log when cache was not event attempted 2022-05-03 18:29:41 +02:00
Dmitry Novik
5ba7a55c18
Merge pull request #36650 from bigo-sg/hive_text_parallel_parsing
Parallel parsing of hive text format
2022-05-03 15:56:28 +02:00
Kruglov Pavel
a902b9d1e7
Try fix builds 2022-05-03 15:56:25 +02:00
Alexander Tokmakov
94af11dd74 add extra info when sending exception 2022-05-03 15:13:47 +02:00
alesapin
991f78b485 Get rid of atomic 2022-05-03 12:17:50 +02:00
Robert Schulze
777b5bc15b
Don't let storages inherit from boost::noncopyable
... IStorage has deleted copy ctor / assignment already
2022-05-03 09:07:08 +02:00
Antonio Andelic
fd0ba2d10b Protect background exception 2022-05-03 06:34:03 +00:00
Antonio Andelic
bfdb4566c6 Use mutex per worker 2022-05-03 06:18:39 +00:00
alesapin
98e3b16560 Terminate if S3 buffer is not finalized 2022-05-02 22:14:18 +02:00
avogar
533e4adf6c Try to fix build 2022-05-02 12:07:31 +00: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
Alexey Milovidov
ef9633499c Merge branch 'master' into fix-trash-s3-metrics 2022-05-02 03:55:10 +02:00
Alexey Milovidov
1ddb04b992
Merge pull request #36715 from amosbird/refactorbase
Reorganize source files so that base won't depend on Common
2022-04-30 09:40:58 +03:00
Kseniia Sumarokova
ca994e0861
Merge pull request #36660 from kssenii/fix-stress-test
Fix stress test after 36639
2022-04-29 12:56:25 +02:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
Kseniia Sumarokova
4102502717
Merge pull request #36619 from ClickHouse/parallel-url-performance-issue
ParallelReadBuffer small improvements
2022-04-29 02:55:30 +02:00
mergify[bot]
41aa85fd4c
Merge branch 'master' into fix-stress-test 2022-04-29 00:54:09 +00:00
kssenii
1cbf672237 Another fix 2022-04-28 22:51:57 +02:00
Sergei Trifonov
11f40376ae
Merge pull request #34571 from surahman/CH-31221-AWS-S3-object-version-id
[CH-31221] AWS S3 Object Version Specification
2022-04-28 15:45:33 +02:00
Alexander Tokmakov
21a021c210
Merge pull request #36745 from vdimir/fix-build-seekable-read-buff
Fix build SeekableReadBufferWithSize -> SeekableReadBuffer
2022-04-28 16:34:24 +03:00
vdimir
7c3cf30163
Fix build SeekableReadBufferWithSize -> SeekableReadBuffer 2022-04-28 15:05:04 +02:00
Anton Kozlov
ca519ca75e
Improve performance of file descriptor cache by narrowing mutex scopes (#36682) 2022-04-28 14:56:53 +02:00