keenwolf
de365a5852
fix
2021-04-06 22:23:15 +03:00
keenwolf
6f9bad682f
Only read needed columns for formats as parquet etc
2021-04-06 22:23:15 +03:00
Maksim Kita
e38206ee02
Merge pull request #22721 from kitaisreal/memory-storage-sync-comments-and-code
...
MemoryStorage sync comments and code
2021-04-06 21:56:41 +03:00
Azat Khuzhin
60b000ed51
Fix approx total rows accounting for reverse reading from MergeTree
2021-04-06 21:13:51 +03:00
Azat Khuzhin
c4a7e81287
Add metric to track how much time is spend during waiting for Buffer layer lock
...
It uses very fast CLOCK_MONOTONIC_COARSE, so this should not be a
problem.
Also note that there is no sense in using microseconds/nanoseconds since
accuracy of CLOCK_MONOTONIC_COARSE usually milliseconds.
2021-04-06 21:13:24 +03:00
Azat Khuzhin
f157278b72
Safer SCOPE_EXIT
...
It executes the code in the dtor, that should never throw.
2021-04-06 21:10:37 +03:00
Maksim Kita
af19f89273
MemoryStorage sync comments and code
2021-04-06 13:41:48 +03:00
Nikolai Kochetov
6102652c99
Merge branch 'master' into better-filter-push-down
2021-04-06 13:38:03 +03:00
alesapin
53a7836a9b
Fix typos
2021-04-06 13:16:34 +03:00
alesapin
6456a1507c
Support alter setting
2021-04-06 13:14:44 +03:00
vdimir
735154c81a
Handle not plain where tree in StorageMerge modifySelect
2021-04-06 12:29:29 +03:00
alesapin
86a843bb51
Merge pull request #21509 from kssenii/library-bridge
...
clickhouse-library-bridge for library dictionary source
2021-04-06 12:26:08 +03:00
tavplubix
8b1d320633
Merge pull request #22217 from kssenii/replicas-shards-for-mysql-and-postgres
...
Replicas and shards for mysql and postgres storages
2021-04-06 11:05:24 +03:00
alesapin
3cd571f92b
Merge pull request #22669 from ClickHouse/fix_two_bugs_with_mutation_wait
...
Fix two stupid bugs in mutation wait
2021-04-06 11:04:16 +03:00
Azat Khuzhin
27d4fbd13b
Compare Block itself for distributed async INSERT batches
...
INSERT into Distributed with insert_distributed_sync=1 stores the
distributed batches on the disk for sending in background.
But types may be a little bit different for the Distributed and it's
underlying table, so the initiator need to know whether conversion is
required or not.
Before this patch those on disk distributed batches contains header,
which includes dumpStructure() for the block in that batch, however it
checks not only names and types and plus dumpStructure() is a debug
method.
So instead of storing string representation for the block header we
should store empty block in the file header (note, that we cannot store
the empty block not in header, since this will require reading all
blocks from file, due to some trickery of the readers interface).
Note, that this patch also contains tiny refactoring:
- s/header/distributed_header/
v1: dumpNamesAndTypes()
v2: dump empty block into the batch itself
v3: move empty block into the header
2021-04-06 10:05:21 +03:00
Maksim Kita
de71553c9d
Merge pull request #22593 from zlobober/introduce_distributed_write
...
Introduce IStorage::distributedWrite method for distributed INSERT SELECTS
2021-04-05 22:59:57 +03:00
kssenii
dc42d5189d
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres
2021-04-05 15:36:35 +00:00
alesapin
c830397317
Fix two stupid bugs in mutation wait
2021-04-05 18:08:43 +03:00
feng lv
f6e4e13f89
fix conflict
2021-04-05 14:08:30 +00:00
feng lv
56073db22d
max distributed depth
...
Add settings max_distributed_depth
fix style
fix
fix
fix
fix test
fix
fix
2021-04-05 14:00:54 +00:00
kssenii
9dba529494
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into library-bridge
2021-04-05 13:14:51 +00:00
alesapin
156ba8a7fc
Disable setting by default and ban for old-syntax MergeTree
2021-04-05 12:16:38 +03:00
alesapin
8d5a787f6b
Merge branch 'master' into merge_tree_deduplication
2021-04-05 10:40:03 +03:00
alexey-milovidov
6cefb8e620
Merge pull request #22583 from azat/log-rwlock-ub-fix
...
Avoid UB in *Log engines for rwlock unlock due to unlock from another thread
2021-04-05 05:20:16 +03:00
Maxim Akhmedov
725fa17961
Introduce IStorage::distributedWrite method for distributed INSERT SELECT.
2021-04-05 02:14:27 +03:00
alexey-milovidov
b1e7624b3f
Merge pull request #22589 from ClickHouse/fix-comments
...
Fix comments
2021-04-05 00:22:27 +03:00
alesapin
0ceb95aa55
Merge branch 'master' into merge_tree_deduplication
2021-04-04 18:32:27 +03:00
Azat Khuzhin
44abb7588a
StorageStripeLog: avoid UB for rwlock unlock due to unlock from another thread
2021-04-04 13:25:44 +03:00
Azat Khuzhin
89a96cf14d
StorageLog: avoid UB for rwlock unlock due to unlock from another thread
2021-04-04 13:25:44 +03:00
Azat Khuzhin
5d795661ed
StorageTinyLog: add regression test for UB due to unlock from different thread
...
Refs: #22560
2021-04-04 13:25:44 +03:00
Azat Khuzhin
5ced6e2e9a
StorageStripeLog: drop mutable qualifier for rwlock
2021-04-04 13:25:43 +03:00
Azat Khuzhin
5ef845af40
StorageLog: drop mutable qualifier for rwlock
2021-04-04 13:25:43 +03:00
Alexey Milovidov
54caa61af5
Fix comments
2021-04-04 12:33:06 +03:00
Alexey Milovidov
8b5d0a598f
Minor improvement in index deserialization
2021-04-04 12:17:54 +03:00
alesapin
548ec6d2cb
Trying enabled setting
2021-04-04 11:02:09 +03:00
alexey-milovidov
67fdfd4b89
Merge pull request #22560 from azat/tiny-log-rwlock-ub-fix
...
Fix UB by unlocking the rwlock of the TinyLog from the same thread
2021-04-03 21:59:01 +03:00
alesapin
1906c77884
Fix tidy one more time
2021-04-03 17:57:03 +03:00
Azat Khuzhin
6cebd3ee1f
Fix UB by unlocking the rwlock of the TinyLog from the same thread
...
Before this patch the build with libstdc++ hangs for
00967_insert_into_distributed_different_types test (and I guess some
others), this is because the rwlock is acquired from different thread as
it was unlocked which causes UB [1], fix this by moving unlock into
writeSuffix().
[1]: The pthread_rwlock_unlock() function shall release a lock held on
the read-write lock object referenced by rwlock. Results are undefined
if the read-write lock rwlock is not held by the **calling thread**.
2021-04-03 16:04:39 +03:00
Azat Khuzhin
10d35867e3
Drop mutable qualifier for StorageTinyLog::rwlock
2021-04-03 16:03:17 +03:00
alesapin
0204f5dd35
Merge branch 'master' into merge_tree_deduplication
2021-04-03 15:24:26 +03:00
alesapin
b127e31451
CI fixes
2021-04-03 14:56:56 +03:00
kssenii
13d1f17d3e
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres
2021-04-03 08:00:09 +00:00
alexey-milovidov
c3a9cbe01c
Merge pull request #22421 from ClickHouse/fix-buffer-overflow-in-token-extractor
...
Fix buffer overflow in token extractor
2021-04-02 22:08:28 +03:00
alesapin
b884593186
Followup fix
2021-04-02 20:55:05 +03:00
alesapin
ca30c91868
More comments
2021-04-02 20:54:24 +03:00
alesapin
fc3afe1087
Fix typos
2021-04-02 20:51:57 +03:00
alesapin
b105153d2c
Useful comment
2021-04-02 20:48:58 +03:00
alesapin
ab34873344
Add some comments
2021-04-02 20:46:01 +03:00
alesapin
a555d078a2
Add exception handling
2021-04-02 19:56:02 +03:00
alesapin
759dd79c76
Add tests
2021-04-02 19:45:18 +03:00
kssenii
2de6b99f84
Better names
2021-04-02 16:12:14 +00:00
robot-clickhouse
39b5674bef
Auto version update to [21.5.1.1] [54450]
2021-04-02 18:34:29 +03:00
Alexander Kuzmenkov
e7df8893df
Merge pull request #22300 from ClickHouse/trying_parallel_func_tests
...
Trying parallel func tests
2021-04-02 18:09:58 +03:00
tavplubix
93bd2c3b67
Merge pull request #18978 from myrrc/feature/attach-partition-local
...
Lookup parts/partitions in replica's own detached/ folder before downloading them from other replicas
2021-04-02 17:46:03 +03:00
alesapin
6f36661575
Buildable code
2021-04-02 16:34:36 +03:00
tavplubix
c1ab9de720
Update MergeTreeDataPartChecksum.cpp
2021-04-02 15:57:30 +03:00
alesapin
2ab87d61eb
Some build fixes
2021-04-02 15:37:42 +03:00
alesapin
14634689e5
Idea code
2021-04-02 14:46:42 +03:00
Maksim Kita
d06fb1197a
Merge pull request #22096 from kitaisreal/hierarchy-dictionaries-updated
...
Refactored hierarchy dictionaries interface
2021-04-02 11:38:01 +03:00
alesapin
4eaf585fe5
Almost nothing added
2021-04-01 22:49:51 +03:00
Mike Kot
c947280dfc
Merge remote-tracking branch 'upstream/master' into feature/attach-partition-local
2021-04-01 21:38:51 +03:00
Mike Kot
60e5946449
Removed needless logging, fixed data part initialization while checking
...
in the detached folder
2021-04-01 20:11:14 +03:00
kssenii
99f0b08ac3
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres
2021-04-01 13:48:33 +00:00
Alexey Milovidov
39c3efdb00
Fix build
2021-04-01 16:38:04 +03:00
Alexander Kuzmenkov
c7bf01fa33
typo
2021-04-01 16:08:18 +03:00
Alexander Kuzmenkov
ba64bc8557
quick fix for inaccessible DatabaseReplicated
2021-04-01 15:21:29 +03:00
kssenii
8300a74f5a
Fix
2021-04-01 12:09:44 +00:00
vdimir
3f464595eb
Accurate removing 'join' part for queries to 'Merge' engine
2021-04-01 14:31:57 +03:00
vdimir
fff8043e55
Revert "Fix joined table access with Merge engine and aggregation"
...
This reverts commit 5476e68d6c
.
2021-04-01 14:31:46 +03:00
kssenii
522d170588
Add default port
2021-04-01 11:30:20 +00:00
vdimir
5476e68d6c
Fix joined table access with Merge engine and aggregation
2021-04-01 14:26:28 +03:00
kssenii
747967a9bb
Better
2021-04-01 10:27:24 +00:00
alesapin
7c8f54e694
More changes
2021-04-01 11:07:56 +03:00
Alexey Milovidov
7db8fcdebd
Fix buffer overflow in TokenExtractor #19233
2021-04-01 05:37:19 +03:00
alexey-milovidov
bbd41d64c2
Update DataPartsExchange.cpp
2021-04-01 02:59:47 +03:00
alexey-milovidov
538be4086b
Recursive removal is extremely dangerous.
2021-04-01 02:59:23 +03:00
alesapin
c15d7e009d
Some initial code
2021-03-31 18:20:30 +03:00
Peng Jian
26b5482b4d
remove the flag in the parser
2021-03-31 22:25:51 +08:00
kssenii
4e849f3b77
Less logging
2021-03-31 14:06:24 +00:00
kssenii
ba5ddd5c32
Do not parse replicas in PoolWithFailover
2021-03-31 14:03:52 +00:00
Nicolae Vartolomei
5cd1dc485f
Delete temporary fetch directory if it already exists
...
It could be left there after a network timeout, a system crash, or
checksum issues.
The downside of this PR is that it would be harder to debug checksum
issues if replication will continuously delete and try to fetch the same
part.
2021-03-31 14:14:58 +01:00
Maksim Kita
55984e849c
Merge branch 'master' into hierarchy-dictionaries-updated
2021-03-31 15:55:07 +03:00
tavplubix
6c1e2a0d87
Merge pull request #21690 from ClickHouse/test_multiple_nodes
...
Run three nodes with Replicated database and NuKeeper in CI
2021-03-31 12:31:13 +03:00
Peng Jian
ec54f2a361
fix compilation error
2021-03-31 17:16:51 +08:00
Peng Jian
278d2d7df0
fix typo
2021-03-31 17:16:51 +08:00
Peng Jian
cad54d4e2c
reset the parser if exception catched.
2021-03-31 17:16:51 +08:00
Peng Jian
85cfb927e6
move HandleKafkaErrorMode to KafkaSettings
2021-03-31 17:16:51 +08:00
Peng Jian
909d5ad2b5
Handle errors for Kafka engine
2021-03-31 17:15:57 +08:00
Alexey Milovidov
e9bfc7456d
Merge branch 'master' into virtualutil
2021-03-31 08:19:43 +03:00
alexey-milovidov
a21fe0b492
Merge pull request #22378 from ianton-ru/s3_zero_copy_replication
...
Fix S3 Zero-Copy replication for hybrid storage
2021-03-31 04:15:47 +03:00
alexey-milovidov
59c158300a
Merge pull request #22365 from ClickHouse/aku/processes-database
...
add current database to system.processes
2021-03-31 04:14:17 +03:00
alexey-milovidov
5c15b8a896
Merge branch 'master' into virtualutil
2021-03-30 23:59:44 +03:00
Anton Ivashkin
f87435213e
Fix S3 Zero-Copy replication for hybrid storage
2021-03-30 20:38:04 +03:00
kssenii
ce05087b1b
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into replicas-shards-for-mysql-and-postgres
2021-03-30 17:27:10 +00:00
Alexander Tokmakov
4f896d2b07
fix tests
2021-03-30 19:46:23 +03:00
Alexander Kuzmenkov
0252f60c23
add current database to system.processes
2021-03-30 16:36:08 +03:00
Vladimir
5ae9f2c5bb
Merge pull request #21329 from depressed-pho/isIPAddressContainedIn
2021-03-30 13:26:49 +03:00
alesapin
2f891521db
Merge pull request #22291 from ClickHouse/no_logical_error_on_mutation
...
Relax covering part check on mutation
2021-03-30 13:25:27 +03:00
Nikolai Kochetov
78e27dc1b6
Merge pull request #22270 from liuneng1994/fix-query-failed
...
fix constant condition conflict with column name and add stateless test
2021-03-30 09:37:43 +03:00
alexey-milovidov
b7b55ce61d
Merge pull request #20088 from nvartolomei/nv/replicated-fetches-timeouts
...
Replicated fetches timeouts
2021-03-30 03:46:09 +03:00
Alexey Milovidov
230b2930b7
Merge branch 'master' into virtualutil
2021-03-30 00:43:00 +03:00
tavplubix
3c0f5a57ec
Merge pull request #21535 from ClickHouse/distributed_ddl_improvements
...
Distributed DDL improvements
2021-03-29 22:40:11 +03:00
alexey-milovidov
9d84f3113a
Merge pull request #21512 from azat/optimize_skip_unused_shards_limit
...
Add optimize_skip_unused_shards_limit
2021-03-29 21:13:18 +03:00
alexey-milovidov
1512ff832e
Merge branch 'master' into nv/replicated-fetches-timeouts
2021-03-29 19:25:13 +03:00
Anton Popov
ea82e7725f
Merge pull request #21562 from CurtizJ/serialization-refactoring-4
...
Refactoring of data types serialization
2021-03-29 16:36:44 +03:00
Alexander Kuzmenkov
0171ab95fa
Merge pull request #21640 from vdimir/fix-join-where-database-engine
...
Remove unknown columns from joined table in where for queries to external database engines
2021-03-29 16:14:10 +03:00
alesapin
f439e17ece
Fix build
2021-03-29 15:41:26 +03:00
alesapin
2c06eb8382
Relax covering part check on mutation
2021-03-29 14:59:28 +03:00
Neng Liu
0d78427fbf
fix query failed and add stateless test
2021-03-29 16:12:02 +08:00
Vladimir
0e9926e6c6
Update src/Storages/transformQueryForExternalDatabase.cpp
...
Co-authored-by: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com>
2021-03-29 09:34:43 +03:00
alexey-milovidov
7ab2890c4d
Merge pull request #22206 from ClickHouse/mmap-cache
...
Add cache for mmap IO
2021-03-29 05:17:55 +03:00
alexey-milovidov
c08289517a
Merge pull request #21766 from amosbird/indexfix
...
Fix scalar subquery index analysis
2021-03-29 02:03:27 +03:00
Alexey Milovidov
a0a3380d91
Remove useless headers
2021-03-28 22:46:45 +03:00
Alexey Milovidov
2a8ac01cdb
Rename as suggested by Kita
2021-03-28 22:24:28 +03:00
kssenii
1bd1a705ce
Fix clang tidy
2021-03-28 12:45:49 +00:00
kssenii
0a66f11f69
Fix style, fix build
2021-03-28 10:27:37 +00:00
Alexey Milovidov
6f9f7d118d
Fixes
2021-03-28 04:27:26 +03:00
Alexey Milovidov
50f712e198
Integrate mmap cache to the infrastructure
2021-03-28 04:10:30 +03:00
kssenii
c17748a0ba
Add proper settings
2021-03-27 21:57:35 +00:00
kssenii
ef537b802f
Better comments
2021-03-27 21:10:44 +00:00
kssenii
22b515fbc9
Add namespace, simplify names
2021-03-27 20:14:02 +00:00
kssenii
f40c582e7a
Replicas/shards for postgres storage
2021-03-27 20:11:48 +00:00
kssenii
f141f027f4
Make common class for external storages
2021-03-27 17:12:47 +00:00
kssenii
95e8a8b9f0
Support shards
2021-03-27 14:40:07 +00:00
kssenii
ae868208c2
Use pool with failover in mysql storage
2021-03-27 14:39:45 +00:00
alesapin
3b119355d2
Merge pull request #22118 from ClickHouse/try_to_fix992
...
Trying to fix my favorite test
2021-03-27 10:17:14 +03:00
Maksim Kita
9f2f0d1095
Refactored hierarchy dictionaries interface
2021-03-26 18:42:32 +03:00
Alexander Kuzmenkov
a455762933
Merge pull request #22117 from ucasFL/useless-code
...
remove useless code
2021-03-26 17:18:14 +03:00
alesapin
35d1443a9c
Don't wait when table shutdown called
2021-03-26 15:54:08 +03:00
tavplubix
ae62bee939
Merge pull request #21913 from ClickHouse/fix_context_ref
...
Fix possibly dangling reference to Context
2021-03-26 10:39:13 +03:00
PHO
1868ca34b8
Fix build on GCC where std::isinf() cannot be called without the namespace prefix
2021-03-26 12:11:22 +09:00
Alexey Milovidov
177a017c5c
Minor modification #22115
2021-03-25 20:51:32 +03:00
alexey-milovidov
f895bc895c
Merge pull request #22011 from ClickHouse/min_max_time_system_parts_datetime64
...
Expose DateTime64 minmax part index in system.parts and system.parts_columns
2021-03-25 16:02:33 +03:00
Anton Popov
6a15431be7
Merge remote-tracking branch 'upstream/master' into HEAD
2021-03-25 15:57:35 +03:00
Anton Popov
f58d470dd6
Merge pull request #21830 from foolchi/optimize_select_with_final
...
optimize select final with prewhere primary key
2021-03-25 15:32:13 +03:00
feng lv
b7622868fc
remove useless code
2021-03-25 11:10:41 +00:00
Nikolai Kochetov
0e2f52518f
Extract converting from UnionStep.
2021-03-25 12:57:14 +03:00
kssenii
bc36baef26
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into library-bridge
2021-03-25 07:48:07 +00:00
Nikolai Kochetov
977ebe8b44
Merge pull request #22058 from azat/system.errors-trace
...
Convert system.errors.stack_trace from String into Array(UInt64)
2021-03-25 10:23:05 +03:00
Mike Kot
285af08949
Merge remote-tracking branch 'upstream/master' into feature/attach-partition-local
2021-03-24 22:34:20 +03:00
Mike Kot
9f25ee3719
Replaced removing checksums.txt with version
...
with the explicit data loading and verification.
If the function fails, the exception will re-throw upper,
cancelling the fetch in the handling of the replicated log entry,
but this event will also wake the PartCheckThread, which will
issue a re-fetch.
2021-03-24 22:30:16 +03:00
kssenii
d9326cc229
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into library-bridge
2021-03-24 18:28:55 +00:00
alexey-milovidov
ffa6585170
Merge pull request #21837 from Jokser/disk-cache-cleanup-directory-before-move
...
Cleanup destination directory during DiskCacheWrapper::moveFile()
2021-03-24 21:19:48 +03:00
fuqi
487d6bdcd9
add test case
...
fix order key check
2021-03-24 16:36:45 +08:00
Azat Khuzhin
7c07b43597
Convert system.errors.stack_trace from String into Array(UInt64)
...
This should decrease overhead for the errors collecting.
2021-03-24 06:52:48 +03:00
alexey-milovidov
612d4fb073
Update IMergeTreeDataPart.cpp
2021-03-24 02:03:14 +03:00
Anton Popov
8a56d04714
Merge branch 'merge_tree_part_block_number' of git://github.com/ahrefs/ClickHouse into merge_21760
2021-03-23 16:47:14 +03:00
Alexander Tokmakov
c938f4f2fe
fix
2021-03-23 14:29:29 +03:00
alesapin
36898bdc4a
Merge pull request #21142 from Jokser/unfreeze-partitions
...
Add ALTER TABLE UNFREEZE command.
2021-03-23 14:05:38 +03:00
Pavel Kovalenko
a92cf30b67
Code review fixes.
2021-03-23 13:33:07 +03:00