Nikolai Kochetov
28d6e3f56c
Merge pull request #22977 from azat/combinator-fix
...
Fix combinators with common prefix name (State and SimpleState) with libstdc++
2021-04-12 12:27:01 +03:00
Maksim Kita
3078fd7d79
Merge pull request #22983 from borodark/master
...
Error message reads better
2021-04-12 10:56:10 +03:00
Azat Khuzhin
79bd8d4d3f
Respect optimize_skip_unused_shards_rewrite_in with optimize_skip_unused_shards_limit
2021-04-12 10:37:28 +03:00
Azat Khuzhin
e439914d38
Fix optimized cluster logic for optimize_skip_unused_shards
2021-04-12 10:37:28 +03:00
Azat Khuzhin
fbb386dca5
Rewrite IN in query for remote shards to exclude values that does not belongs to shard
...
v2: fix optimize_skip_unused_shards_rewrite_in for sharding_key wrapped into function
v3: fix column name for optimize_skip_unused_shards_rewrite_in
v4: fix optimize_skip_unused_shards_rewrite_in with Null
v5:
- squash with Remove query argument for IStreamFactory::createForShard()
- use proper column after function execution (using sharding_key_column_name)
- update the test reference since (X) now is tuple(X)
2021-04-12 10:37:28 +03:00
Egor O'Sten
c8b572ed59
Readability of error message for ORDER BY
2021-04-11 20:42:05 -04:00
Egor O'Sten
c77dd36ca9
Readability of error message for ORDER BY
2021-04-11 20:40:00 -04:00
kssenii
df84e4e93a
Fix
2021-04-11 23:39:18 +00:00
Alexey Milovidov
22720dd7a4
Fix trivial mistake in filtering by virtual columns
2021-04-11 22:39:22 +03:00
Azat Khuzhin
0bf6b61b59
Fix combinators with common prefix name (State and SimpleState) with libstdc++
...
Previously sort order of the std::unordered_map in libstdc++ was
different and any *SimpleState() reports an error that function does not
exists.
Fix this by using proper order in container, and use std::vector over
std::unordered_map, since there linear traversing anyway in the single
method -- tryFindSuffix()
Note that test is not required, since it either fail with unknown
function or not.
2021-04-11 22:10:02 +03:00
Maksim Kita
aa6183af86
Merge pull request #22971 from azat/max_part_removal_threads
...
Respect max_part_removal_threads for ReplicatedMergeTree
2021-04-11 21:14:47 +03:00
Azat Khuzhin
b24d1251de
Introduce helper for removing one part from fs for ReplicatedMergeTree
2021-04-11 14:38:46 +03:00
alexey-milovidov
0f6fc5bd72
Merge pull request #22962 from kitaisreal/storage-external-distributed-arcadia-fix
...
StorageExternalDistributed arcadia fix
2021-04-11 13:34:03 +03:00
Azat Khuzhin
940ff6cb76
Do not use c-style cast for std::min(max_part_removal_threads)
2021-04-11 12:22:39 +03:00
Azat Khuzhin
6e71757814
Fix thread accounting for max_part_removal_threads
2021-04-11 11:43:30 +03:00
Azat Khuzhin
dfe3699e77
Respect max_part_removal_threads for ReplicatedMergeTree
2021-04-11 11:33:45 +03:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Maksim Kita
685da4e234
StorageExternalDistributed arcadia fix
2021-04-10 21:52:17 +03:00
Azat Khuzhin
a6703c5ac2
Fix inactive_parts_to_throw_insert=0 with inactive_parts_to_delay_insert>0
2021-04-10 09:57:08 +03:00
Alexander Kuzmenkov
e44b3822e3
Merge pull request #21850 from fastio/handle_errors_for_kafka_engine
...
Handle errors for Kafka engine
2021-04-09 22:59:40 +03:00
Alexander Kuzmenkov
0264124146
Merge pull request #21942 from ucasFL/distributed_depth
...
Add settings max_distributed_depth
2021-04-09 15:52:58 +03:00
Nikolai Kochetov
28ca191102
Merge pull request #22087 from ClickHouse/better-filter-push-down
...
Better filter push down
2021-04-09 10:22:17 +03:00
alesapin
4b0f973f93
Merge pull request #18215 from filimonov/quorum-dedup-issue
...
Fix issue with quorum retries behaviour
2021-04-09 10:19:50 +03:00
alexey-milovidov
42b865c9c1
Merge pull request #22829 from azat/dist-send-log
...
Slightly improve logging messages for Distributed async sends
2021-04-09 09:51:53 +03:00
alexey-milovidov
b02a82250b
Merge pull request #22858 from vitlibar/fix-hanging-in-temporary-live-view-cleaner
...
Fix hanging in TemporaryLiveViewCleaner
2021-04-09 09:25:38 +03:00
Anton Popov
1c28878f5d
Merge pull request #22726 from azat/mt-reverse-total-rows-approx-fix
...
Fix approx total rows accounting for reverse reading from MergeTree
2021-04-09 00:16:49 +03:00
Vitaly Baranov
5bcb7a0fed
Fix hanging in TemporaryLiveViewCleaner
2021-04-08 16:14:49 +03:00
alesapin
e762d02e37
More const
2021-04-08 13:38:40 +03:00
alesapin
e17444757b
Fix rare case when quorum insert is not really quorum because of deduplication
2021-04-08 13:35:38 +03:00
alesapin
1533f9b9aa
Merge pull request #14113 from johnskopis/dynamic-interserver-creds-v20
...
Support interserver credential rotation
2021-04-08 11:01:40 +03:00
Azat Khuzhin
c27b931f6a
Slightly improve logging messages for Distributed async sends
...
- add took time (in ms)
- add rows/bytes
2021-04-08 08:10:39 +03:00
alesapin
b2a370ad49
Fix PVS
2021-04-07 19:06:20 +03:00
alesapin
2987bbc948
Small improvements
2021-04-07 16:52:11 +03:00
Nikita Mikhaylov
48af7a898c
Merge pull request #22299 from nikitamikhaylov/keen-wolf-storagefile-column-oriented
...
Merging #21302
2021-04-07 16:01:12 +03:00
Kruglov Pavel
5b52657428
Merge pull request #22725 from azat/buffer-lock-metrics
...
Add metric to track how much time is spend during waiting for Buffer layer lock
2021-04-07 14:35:57 +03:00
Vladimir
864ab4a7ab
Merge pull request #21370 from vdimir/fix-merge-engine-join-group-by
2021-04-07 11:52:27 +03:00
Vladimir
db0550013c
Merge pull request #22325 from azat/dist-async-insert-header-check
...
Check only column name and type for async distributed blocks
2021-04-07 11:51:12 +03:00
alesapin
9fd251eaaf
Merge pull request #22514 from ClickHouse/merge_tree_deduplication
...
Non replicated merge tree deduplication
2021-04-07 10:19:43 +03:00
alexey-milovidov
a7e216969a
Merge pull request #22592 from azat/uncaught-exceptions
...
Fix some uncaught exceptions (in SCOPE_EXIT) under memory pressure
2021-04-07 07:17:26 +03:00
Nikita Mikhailov
71a2c85d9a
better
2021-04-06 22:23:16 +03:00
Nikita Mikhailov
af85ce2fd1
better
2021-04-06 22:23:16 +03:00
Nikita Mikhailov
37f48d13b4
add test
2021-04-06 22:23:16 +03:00
Nikita Mikhailov
282775b10c
save
2021-04-06 22:23:16 +03:00
keenwolf
1a4961499b
the Native format is not supported after test
2021-04-06 22:23:16 +03:00
keenwolf
94c8e7af1a
remove const for value-copy-return
2021-04-06 22:23:16 +03:00
keenwolf
3d3923b518
update comments
2021-04-06 22:23:16 +03:00
keenwolf
b95f54edce
Small fix
2021-04-06 22:23:16 +03:00
keenwolf
139bb678a9
Branch with Format isColumnOriented() or not
2021-04-06 22:23:15 +03:00
keenwolf
4eaf718fd2
fix the getColumsForNames() to bring the whole column info from metadata
2021-04-06 22:23:15 +03:00
keenwolf
9d6e2b4bad
update comments
2021-04-06 22:23:15 +03:00
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