Commit Graph

1389 Commits

Author SHA1 Message Date
Alexey Milovidov
53450b1b09 Merge branch 'master' into merge-tree-settings-sanity-check 2020-08-02 02:47:57 +03:00
Alexey Milovidov
084e261687 Trigger CI 2020-08-02 01:06:09 +03:00
alexey-milovidov
566044f9c8
Merge pull request #12991 from ClickHouse/kafka-fix-msan
Fix MSan error in "rdkafka" library #12990
2020-08-02 00:22:44 +03:00
Alexey Milovidov
8fe201f1b9 Merge branch 'master' into merge-tree-settings-sanity-check 2020-08-01 19:20:11 +03:00
Nikolai Kochetov
c786f05388
Merge pull request #13189 from ClickHouse/refactor-pipes-2
Remove TreeExecutorBIS
2020-08-01 11:56:50 +03:00
Vitaly Baranov
56665a15f7 Rework and rename the template class SettingsCollection => BaseSettings. 2020-07-31 20:54:18 +03:00
Vitaly Baranov
e40a8ac176 Use names of the settings instead of their indices in SettingsConstraints and settings profiles. 2020-07-31 19:11:27 +03:00
Vitaly Baranov
300727afa3 Rework the StringField* classes and make conversion String => StringField* explicit. 2020-07-31 19:11:27 +03:00
Vitaly Baranov
90602b869a Make SettingsChanges a class. 2020-07-31 19:11:27 +03:00
Vitaly Baranov
4ad99f1472 Make type names of settings shorter: SettingUInt64 => UInt64. 2020-07-31 19:11:27 +03:00
Vitaly Baranov
30b34e6a15 Use SettingSeconds only in Settings, use std::chrono::seconds in other places. 2020-07-31 19:11:27 +03:00
Nikolai Kochetov
39530f837e Remove TreeExecutorBlockInputStream. 2020-07-31 16:23:19 +03:00
alesapin
45894fcf99 Better comments 2020-07-31 15:22:32 +03:00
alexey-milovidov
bbc8473388
Update StorageMergeTree.cpp 2020-07-31 15:00:07 +03:00
alexey-milovidov
9c9ef0db9b
Merge branch 'master' into database_atomic_improvements 2020-07-31 14:56:49 +03:00
alesapin
14928874a1 Fix mutations status check 2020-07-31 14:37:16 +03:00
alesapin
2eb01fd655
Merge pull request #13104 from ClickHouse/volumes-refactorings
Merging #12670
2020-07-31 11:21:30 +03:00
alexey-milovidov
74edcfb87e
Merge pull request #13073 from nikitamikhaylov/rewrite-tests
BayesAB test
2020-07-31 02:30:07 +03:00
Alexey Milovidov
2c40539df6 Check ALTERs; update test 2020-07-31 00:42:55 +03:00
Alexey Milovidov
c491b2c153 Lower stack frame size 2020-07-30 23:58:08 +03:00
Alexey Milovidov
362655fa43 Fix some bad tests 2020-07-30 22:59:49 +03:00
Alexey Milovidov
a9b02e8184 Fix trivial bug in code 2020-07-30 22:33:20 +03:00
Alexey Milovidov
b9f49d31df Sanity checks for MergeTreeSettings 2020-07-30 22:08:13 +03:00
alexey-milovidov
fc35ce69fa
Merge pull request #12666 from ClickHouse/forward_alter_error_to_client
Forward exceptions to client if exception happened during ALTER
2020-07-30 21:36:06 +03:00
Nicolae Vartolomei
85174d64a0 Use absolute paths to backup locations (shadow)
Tests are frankenstain. Had to hide absolute path `/tmp/clickhouse.test..IP69I/data/shadow/test_01417_single_part_7/data/default/table_for_freeze/7_8_8_0` to make them deterministic and independend of the method they are run (local vs remote target)
2020-07-30 18:03:26 +01:00
alexey-milovidov
4c3241808d
Merge pull request #12728 from ClickHouse/prevent-inconsistent-merge-tree-settings
Safe logic for incorrect MergeTreeSettings
2020-07-30 17:55:39 +03:00
Pavel Kovalenko
00181d34fd DiskS3 caching improvements. 2020-07-30 16:42:05 +03:00
alexey-milovidov
e6265bf299
Merge pull request #13100 from ClickHouse/keep-less-amount-of-logs-in-zookeeper
Keep less amount of logs in ZooKeeper
2020-07-30 15:41:55 +03:00
alexey-milovidov
a22bdb1989
Merge pull request #13081 from CurtizJ/fix-index_analysis
Fix wrong index analysis with functions
2020-07-30 15:30:55 +03:00
alesapin
d3ea1d914b Tiny fixes and avoid dynamic casts 2020-07-30 13:04:49 +03:00
alesapin
724b7be555 Merge branch 'volumes-related-refactorings' of https://github.com/excitoon-favorites/ClickHouse into volumes-refactorings 2020-07-30 12:20:48 +03:00
Alexey Milovidov
6517ddcbd4 Keep less amount of logs in ZooKeeper 2020-07-30 05:47:05 +03:00
Vladimir Chebotarev
bcc926fbb2 Returned max_data_part_size to system.storage_policies. 2020-07-30 04:19:32 +03:00
Alexander Kuzmenkov
881220eec2
Merge pull request #12755 from bobrik/ivan/obvious-skip-overall
Show marks before applying skipping indices
2020-07-29 20:59:08 +03:00
Nikita Mikhaylov
1d6c2ba689 rewrite other test + remove useless includes 2020-07-29 20:37:57 +03:00
Anton Popov
4c266d1e5d fix wrong index analysis with functions 2020-07-29 19:09:38 +03:00
alesapin
7a806eb90f
Merge pull request #13017 from ClickHouse/freeze_partition_with_name
Alter table freeze with verbose output
2020-07-29 18:42:48 +03:00
alesapin
ba8a29a3a4 Better logging on mutation skip 2020-07-29 16:12:55 +03:00
Alexander Kuzmenkov
80fcbfb1eb
Merge pull request #13034 from ClickHouse/aku/block-structure-mismatch
Block structure mismatch is a program error
2020-07-29 13:01:11 +03:00
alesapin
7fc1e45c3b Review fixe 2020-07-29 11:32:52 +03:00
Alexander Kuzmenkov
f6f2812f73 Block structure mismatch is a program error 2020-07-28 21:35:18 +03:00
Alexander Kuzmenkov
1b9269ae0c fixup 2020-07-28 19:58:19 +03:00
Alexander Kuzmenkov
297cf65f1f Merge remote-tracking branch 'origin/master' into HEAD 2020-07-28 19:56:35 +03:00
Vladimir Chebotarev
faedb04722 Minor fixes. 2020-07-28 19:45:46 +03:00
alesapin
b02951fd3a Remove new lines 2020-07-28 18:48:35 +03:00
alesapin
c75830e878 Alter table freeze with verbose output 2020-07-28 18:10:36 +03:00
alesapin
585d9247ec
Merge pull request #12959 from ClickHouse/test_for_backup
Check backup restore in integration test.
2020-07-28 17:59:52 +03:00
Alexander Kazakov
2bde393499
Merging #12548 - Correction to merge_with_ttl_timeout logic by @excitoon (#12982)
* Fixed `merge_with_ttl_timeout` logic.
* Separate TTL-merge timers for each partition

Co-authored-by: Vladimir Chebotarev <vladimir.chebotarev@gmail.com>
2020-07-28 17:38:34 +03:00
Alexander Kuzmenkov
ba7c33f806
Merge pull request #12754 from bobrik/ivan/obvious-skip
Show total granules examined by skipping indices
2020-07-28 17:14:25 +03:00
alexey-milovidov
7a22717180
Merge pull request #12760 from ClickHouse/sticky_mutations_bug
Sticking mutations bug
2020-07-28 14:42:54 +03:00
alesapin
1bece3de0a Remove strange code and test 2020-07-28 12:36:08 +03:00
alexey-milovidov
4d76f41449
Merge pull request #12658 from azat/kafka-unavail-broker-SIGSEGV
Fix SIGSEGV in StorageKafka when broker is unavailable
2020-07-28 00:03:54 +03:00
Alexey Milovidov
798ef1b9f9 Adjustments; added test result 2020-07-27 23:18:23 +03:00
Alexey Milovidov
ec84ed30cb Merge branch 'master' into prevent-inconsistent-merge-tree-settings 2020-07-27 21:39:25 +03:00
Nikolai Kochetov
abdd160db1
Merge pull request #12589 from bobrik/ivan/parallel-ranges
Parallelize PK range and skipping index stages
2020-07-27 19:23:00 +03:00
alexey-milovidov
7dac65ce0f
Merge pull request #12659 from zhang2014/fix/ISSUES-10572
ISSUES-10572 fix bloom filter with const column
2020-07-27 14:38:56 +03:00
Anton Popov
c23bc8aace
Merge pull request #12492 from CurtizJ/polymorphic-parts-4
Make read buffer size lower, while reading from compact parts
2020-07-27 14:22:54 +03:00
alesapin
1707f84a44 Less strict check and rare rename bug 2020-07-27 12:42:37 +03:00
Vladimir Chebotarev
1b3f5c99f5 Real fix of test. 2020-07-26 21:27:36 +03:00
Vladimir Chebotarev
f5af64514f Test fix (removed redundant code). 2020-07-26 21:27:36 +03:00
Vladimir Chebotarev
8039d45910 Minor fix in StorageDistributed. 2020-07-26 21:27:36 +03:00
Gleb Novikov
ee07c74868 Fixed integration test_multiple_disks 2020-07-26 21:27:36 +03:00
Gleb Novikov
7f5b6fba78 Generic volume is coming...
1. SingleDiskVolume for temporary volumes
2. Generic VolumePtr in StoragePolicies
3. Removed max_data_part_size in system.storage_policies, added volume_type
2020-07-26 21:27:36 +03:00
alesapin
e0bf5913e7 Fix sticking mutations 2020-07-26 17:21:57 +03:00
Alexander Tokmakov
6bfe88e83f Merge branch 'master' into database_atomic_improvements 2020-07-26 13:40:05 +03:00
alesapin
c66dc23a47 Fix error style 2020-07-25 23:56:29 +03:00
alesapin
eae7dc852e Fix build 2020-07-25 23:54:33 +03:00
alesapin
393a9195ca Better exception message 2020-07-25 17:45:46 +03:00
alesapin
78d357f0d2 Add a test for sticking mutations bug 2020-07-25 17:42:20 +03:00
Ivan Babrou
e835ec0b56 Show marks before applying skipping indices
This change makes skipping index efficiency more obvious, changing this:

```
Selected 30 parts by date, 30 parts by key, 592 marks to read from 541 ranges
```

Into this:

```
Selected 30 parts by date, 30 parts by key, 48324 marks by primary key, 592 marks to read from 541 ranges
```
2020-07-24 15:45:38 -07:00
Ivan Babrou
67d4529783 Show total granules examined by skipping indices
This change makes skipping index efficiency more obvious, changing this:

```
Index `idx_duration` has dropped 59 granules.
```

Into this:

```
Index `idx_duration` has dropped 59 / 61 granules.
```
2020-07-24 14:50:32 -07:00
Azat Khuzhin
d3b95d3fb0 Link clickhouse_storages_system with Poco::JSON (fixes unbundled+shared build) 2020-07-24 00:57:45 +03:00
Anton Popov
d3fbeb296e write compressed blocks for every column in granule 2020-07-23 19:56:12 +03:00
Anton Popov
61018c275d Merge remote-tracking branch 'upstream/master' into polymorphic-parts-4 2020-07-23 18:38:29 +03:00
Anton Popov
1d0493cfcc better code in ReaderCompact and perf test added 2020-07-23 18:37:44 +03:00
Nikolai Kochetov
dad9d369a1 Merge branch 'master' into bobrik-parallel-randes 2020-07-23 16:21:32 +03:00
Alexey Milovidov
6b4be2b9fe Safe logic for incorrect MergeTreeSettings #10897 2020-07-23 15:31:09 +03:00
Azat Khuzhin
c97fb4b0e5
Remove unused bits in MergeTreeRangeReader (#12671)
Refs: #7769
Cc: @amosbird
2020-07-23 11:20:09 +03:00
alesapin
978f286625 Trying to fix FreeBSD build 2020-07-23 11:00:18 +03:00
alesapin
6fdcb59df7 Merge branch 'master' into forward_alter_error_to_client 2020-07-23 10:48:58 +03:00
Alexander Tokmakov
237accd154 Merge branch 'master' into database_atomic_improvements 2020-07-23 06:33:20 +03:00
alesapin
355150afce Fix deadlock and better code 2020-07-22 22:29:54 +03:00
Artem Zuikov
2afd123eda
Refactoring: extract TreeOptimizer from SyntaxAnalyzer (#12645) 2020-07-22 20:13:05 +03:00
alesapin
8c8bdd5070 Fix tests and work with multiple mutations 2020-07-22 18:19:54 +03:00
Nikolai Kochetov
76d784be9c
Merge pull request #12613 from ClickHouse/remove-sort-description-from-streams
Remove sort description from streams
2020-07-22 17:35:05 +03:00
alesapin
7585fc4b52 Fix style 2020-07-22 16:22:05 +03:00
alesapin
de846e5e3c Forward exception to client during alter 2020-07-22 15:36:19 +03:00
Nikolai Kochetov
b27066389a Do not create ThreadPool for single thread. 2020-07-22 14:51:35 +03:00
zhang2014
580889f1e4 ISSUES-10572 fix bloom filter with const column 2020-07-22 17:42:12 +08:00
Azat Khuzhin
e2d9176617 Fix SIGSEGV in StorageKafka when broker is unavailable 2020-07-22 11:28:07 +03:00
Alexander Tokmakov
9bcaaea3e0 Merge branch 'master' into database_atomic_improvements 2020-07-22 05:24:48 +03:00
alesapin
be106b662e Comment and style 2020-07-21 18:19:41 +03:00
Nikolai Kochetov
486a4932c3 Fix tests. 2020-07-21 17:08:18 +03:00
alesapin
daaa5cc382 Add setting allow_non_metadata_alters 2020-07-21 17:05:30 +03:00
Nikolai Kochetov
755f15def3 Make MergeTreeSetIndex::checkInRange const. 2020-07-21 14:22:45 +03:00
alesapin
379a5a750a Fix error message about granularity 2020-07-21 14:10:23 +03:00
Nikolai Kochetov
12c5e376c6 Remove mutable from RPNElement. 2020-07-21 14:02:58 +03:00
Nikolai Kochetov
cab9146ff3 Remove SortDescription from IBlockInputStream. 2020-07-21 11:05:52 +03:00
Nikolai Kochetov
d6583698a9 Merge branch 'master' into bobrik-parallel-randes 2020-07-20 19:05:28 +03:00
Nikolai Kochetov
0cc55781d8 Try fix tests. 2020-07-20 18:09:00 +03:00
Alexander Kuzmenkov
40ee6eba19
Merge pull request #12545 from ClickHouse/fix_load_part_without_checksums
Fix loading parts without checksums
2020-07-20 14:40:53 +03:00
Ivan Babrou
72622a9b00 Parallelize PK range and skipping index stages
This runs PK lookup and skipping index stages on parts
in parallel, as described in #11564.

While #12277 sped up PK lookups, skipping index stage
may still be a bottleneck in a select query. Here we
parallelize both stages between parts.

On a query that uses a bloom filter skipping index to pick
2,688 rows out of 8,273,114,994 on a two day time span,
this change reduces latency from 10.5s to 1.5s.
2020-07-19 21:49:41 -07:00
tavplubix
5634482393
Merge pull request #12556 from azat/distributed-remove-files-on-drop
Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE
2020-07-17 19:29:57 +03:00
Alexander Tokmakov
c27de9b424 fixes 2020-07-17 16:11:44 +03:00
alexey-milovidov
9fb40a3f7b
Merge pull request #12386 from fastio/master
COS (Tencent Cloud Object Storage) integration
2020-07-17 14:09:16 +03:00
alesapin
ac802a8e96
Merge pull request #12543 from ClickHouse/fix_marks_type_on_mutation
Fix incorrect adaptive granularity by default
2020-07-17 11:09:54 +03:00
Azat Khuzhin
6ea1b19476 Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE 2020-07-17 08:59:57 +03:00
Alexander Tokmakov
a612080df1 Merge branch 'master' into database_atomic_improvements 2020-07-17 00:43:59 +03:00
alexey-milovidov
fde8c87a1f
Merge pull request #12426 from ClickHouse/log-engine-rollback-on-insert-error
Rollback insertion error in Log engines
2020-07-16 22:50:48 +03:00
Anton Popov
97e8a88b30
Merge pull request #12277 from bobrik/ivan/exact-range-speedup
WIP: Optimize PK lookup for queries that match exact PK range
2020-07-16 19:17:50 +03:00
alesapin
b3ec3b1ed1 Fix loading parts without checksums 2020-07-16 13:54:49 +03:00
Vitaly Baranov
000b197ad1
Merge pull request #11234 from traceon/ldap-per-user-authentication
Add LDAP authentication support
2020-07-16 13:17:21 +03:00
alesapin
42983c5416 Fix incorrect adaptive granularity by default 2020-07-16 12:10:15 +03:00
Alexey Milovidov
6df282e813 Fixup 2020-07-16 11:33:51 +03:00
alexey-milovidov
8966c09ed6
Merge pull request #12519 from vzakaznikov/fix_data_duplication_and_tests_for_live_view
Fixing race condition in live view tables which could cause data duplication and live view tests
2020-07-16 11:03:28 +03:00
Alexey Milovidov
68f9fd3767 Debug tests 2020-07-16 06:02:20 +03:00
Alexey Milovidov
82ea884d01 Fix incorrect unit test 2020-07-16 05:37:12 +03:00
Alexey Milovidov
3408b7e259 Merge branch 'master' into log-engine-rollback-on-insert-error 2020-07-16 05:34:02 +03:00
Denis Glazachev
59cb758cf7 Merge branch 'master' into ldap-per-user-authentication 2020-07-16 02:29:24 +04:00
Alexander Tokmakov
f6949b2f47 use dictionary ids 2020-07-15 22:25:31 +03:00
Alexey Milovidov
e1e2204279 Whitespace 2020-07-15 19:37:52 +03:00
Vitaliy Zakaznikov
370dd3396b Fixing clang build. 2020-07-15 16:18:53 +02:00
Anton Popov
c6423b2b28 lower read buffer size, while reading from compact parts 2020-07-15 14:53:23 +03:00
Vitaliy Zakaznikov
560151f6cd * Fix bug in StorageLiveView.cpp
* Fixing synchronization of the first insert in live view tests
2020-07-15 13:24:33 +02:00
Alexander Tokmakov
2fe2833a0d fix build 2020-07-15 13:18:30 +03:00
Alexander Tokmakov
09abe71b60 Merge branch 'master' into database_atomic_improvements 2020-07-15 13:07:08 +03:00
alesapin
614540eddf
Merge pull request #12382 from ClickHouse/clear-all-columns
Better errors for CLEAR/DROP columns (possibly in partitions)
2020-07-15 12:52:06 +03:00
alexey-milovidov
9c68124110
Merge pull request #12302 from azat/kafka-error-in-the-batch-SIGSEGV
kafka: fix SIGSEGV if there is a message with error in the middle of the batch
2020-07-15 05:20:26 +03:00
Alexander Tokmakov
eea0cdcf25 add uuid to generated config 2020-07-14 23:32:13 +03:00
alesapin
9e41fbca55 Remove check for drop detached partition 2020-07-14 16:56:30 +03:00
Alexander Kuzmenkov
b515dd5b83 Merge remote-tracking branch 'origin/master' into HEAD 2020-07-14 15:40:27 +03:00
Alexander Kuzmenkov
b24f727aea typo 2020-07-14 15:40:18 +03:00
alesapin
014bb070ec Fix tests 2020-07-14 11:19:39 +03:00
alexey-milovidov
fd4adf27d6
Merge pull request #12456 from CurtizJ/fix-12437
Fix #12437
2020-07-14 09:28:31 +03:00
alexey-milovidov
1893d89ce3
Merge pull request #12448 from ClickHouse/fix-trash-rabbitmq
Fix trash from RabbitMQ
2020-07-14 01:11:37 +03:00
alesapin
1f576ee039 Some intermediate solution 2020-07-13 20:27:52 +03:00
Alexey Milovidov
cb46bca157 Merge branch 'master' into fix-trash-rabbitmq 2020-07-13 19:51:17 +03:00
alesapin
4a53264a86 Remove redundant and duplicated code 2020-07-13 19:19:08 +03:00
robot-clickhouse
0f23642a3d Auto version update to [20.7.1.1] [54437] 2020-07-13 18:26:03 +03:00
Alexander Tokmakov
fdb02edc7c Merge branch 'master' into database_atomic_improvements 2020-07-13 17:28:48 +03:00
Peng Jian
7579d65ebc Registering StorageS3 and TableFunctionS3 under two different names (S3 and COSN). 2020-07-13 22:13:30 +08:00
Alexander Kuzmenkov
d6e7ab5988 Fuzzing-related fixes 2020-07-13 16:58:48 +03:00
Alexander Tokmakov
04c3e7cab6 add implicit uuid macro 2020-07-13 16:18:38 +03:00
Denis Glazachev
f787702922 Merge branch 'master' into ldap-per-user-authentication
* master: (27 commits)
  Whitespaces
  Fix typo
  Fix UBSan report in base64
  Correct default secure port for clickhouse-benchmark #11044
  Remove test with bug #10697
  Update in-functions.md (#12430)
  Allow nullable key in MergeTree
  Update arithmetic-functions.md
  [docs] add rabbitmq docs (#12326)
  Lower block sizes and look what will happen #9248
  Fix lifetime_bytes/lifetime_rows for Buffer direct block write
  Retrigger CI
  Fix up  test_mysql_protocol failed
  Implement lifetime_rows/lifetime_bytes for Buffer engine
  Add comment regarding proxy tunnel usage in PocoHTTPClient.cpp
  Add lifetime_rows/lifetime_bytes interface (exported via system.tables)
  Tiny IStorage refactoring
  Trigger integration-test-runner image rebuild.
  Delete log.txt
  Fix test_mysql_client/test_python_client error
  ...
2020-07-13 15:46:27 +04:00
Anton Popov
a9530d2883 in-memory parts: fix reading from nested 2020-07-13 12:10:55 +03:00
alexey-milovidov
ae7eff98ed
Merge pull request #12433 from amosbird/np
Allow nullable key in MergeTree
2020-07-13 04:36:00 +03:00
Alexey Milovidov
8f2055b0a0 Fix trash from RabbitMQ 2020-07-13 04:11:48 +03:00
Amos Bird
cac5a89169
Allow nullable key in MergeTree 2020-07-12 22:21:51 +08:00
Alexey Milovidov
49f60ef3a4 Fix build 2020-07-12 08:26:33 +03:00
Alexey Milovidov
204a4af394 Rollback insertion error in Log engines #12402 2020-07-12 05:32:18 +03:00
Ivan Babrou
8784994d65 Allow conditions outside of PK with exact range
Conditions that are outside of PK are marked as `unknown` in `KeyCondition`,
so it's safe to allow them, as long as they are always combined by `AND`.
2020-07-11 18:59:26 -07:00
Azat Khuzhin
3bee98c6f0 Fix lifetime_bytes/lifetime_rows for Buffer direct block write 2020-07-12 01:16:05 +03:00
Ivan Babrou
d9d8d0242e Optimize PK lookup for queries that match exact PK range
Existing code that looks up marks that match the query has a pathological
case, when most of the part does in fact match the query.

The code works by recursively splitting a part into ranges and then discarding
the ranges that definitely do not match the query, based on primary key.

The problem is that it requires visiting every mark that matches the query,
making the complexity of this sort of look up O(n).

For queries that match exact range on the primary key, we can find
both left and right parts of the range with O(log 2) complexity.

This change implements exactly that.

To engage this optimization, the query must:

* Have a prefix list of the primary key.
* Have only range or single set element constraints for columns.
* Have only AND as a boolean operator.

Consider a table with `(service, timestamp)` as the primary key.

The following conditions will be optimized:

* `service = 'foo'`
* `service = 'foo' and timestamp >= now() - 3600`
* `service in ('foo')`
* `service in ('foo') and timestamp >= now() - 3600 and timestamp <= now`

The following will fall back to previous lookup algorithm:

* `timestamp >= now() - 3600`
* `service in ('foo', 'bar') and timestamp >= now() - 3600`
* `service = 'foo'`

Note that the optimization won't engage when PK has a range expression
followed by a point expression, since in that case the range is not continuous.

Trace query logging provides the following messages types of messages,
each representing a different kind of PK usage for a part:

```
Used optimized inclusion search over index for part 20200711_5710108_5710108_0 with 9 steps
Used generic exclusion search over index for part 20200711_5710118_5710228_5 with 1495 steps
Not using index on part 20200710_5710473_5710473_0
```

Number of steps translates to computational complexity.

Here's a comparison for before and after for a query over 24h of data:

```
Read 4562944 rows, 148.05 MiB in 45.19249672 sec.,   100966 rows/sec.,   3.28 MiB/sec.
Read 4183040 rows, 135.78 MiB in 0.196279627 sec., 21311636 rows/sec., 691.75 MiB/sec.
```

This is especially useful for queries that read data in order
and terminate early to return "last X things" matching a query.

See #11564 for more thoughts on this.
2020-07-11 12:26:54 -07:00
Denis Glazachev
edb6ef8c09 Merge commit 'ceac649c01b0158090cd271776f3219f5e7ff57c' into ldap-per-user-authentication
* commit 'ceac649c01b0158090cd271776f3219f5e7ff57c': (75 commits)
  [docs] split misc statements (#12403)
  Update 00405_pretty_formats.reference
  Update PrettyCompactBlockOutputFormat.cpp
  Update PrettyBlockOutputFormat.cpp
  Update DataTypeNullable.cpp
  Update 01383_remote_ambiguous_column_shard.sql
  add output_format_pretty_grid_charset setting in docs
  add setting output_format_pretty_grid_charset
  Added a test for #11135
  Update index.md
  RIGHT and FULL JOIN for MergeJoin (#12118)
  Update MergeTreeIndexFullText.cpp
  restart the tests
  [docs] add syntax highlight (#12398)
  query fuzzer
  Fix std::bad_typeid when JSON functions called with argument of wrong type.
  Allow typeid_cast() to cast nullptr to nullptr.
  fix another context-related segfault
  [security docs] actually, only admins can create advisories
  query fuzzer
  ...
2020-07-11 21:32:36 +04:00
Azat Khuzhin
32a45d0dee Implement lifetime_rows/lifetime_bytes for Buffer engine
Buffer engine is usually used on INSERTs, but right now there is no way
to track number of INSERTed rows per-table, since only summary metrics
exists:
- StorageBufferRows
- StorageBufferBytes

But it can be pretty useful to track INSERTed rows rate (and it can be
exposed via http_handlers for i.e. prometheus)
2020-07-11 16:06:11 +03:00
Azat Khuzhin
433fdffc19 Add lifetime_rows/lifetime_bytes interface (exported via system.tables) 2020-07-11 15:33:11 +03:00
Azat Khuzhin
84c93a6b02 Tiny IStorage refactoring 2020-07-11 15:17:06 +03:00
alexey-milovidov
e22547c29d
Merge pull request #12388 from ClickHouse/bloom-filter-arg-check
Check arguments of bloom filter index
2020-07-10 20:54:16 +03:00
alexey-milovidov
caef1d8e24
Update MergeTreeIndexFullText.cpp 2020-07-10 20:53:58 +03:00
alexey-milovidov
d819624d7c
Merge pull request #12378 from ClickHouse/allow-clear-column-with-dependencies
Allow to CLEAR column even if there are depending DEFAULT expressions
2020-07-10 20:18:14 +03:00
alexey-milovidov
031c773260
Merge pull request #12384 from ClickHouse/support-negative-float-constants-in-key-condition
Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables
2020-07-10 20:16:35 +03:00
Azat Khuzhin
610382b693 kafka: fix SIGSEGV if there is an message with error in the middle of the batch
ReadBufferFromKafkaConsumer does not handle the case when there is
message with an error on non first position in the current batch, since
it goes through messages in the batch after poll and stop on first valid
message.

But later it can try to use message as valid:
- while storing offset
- get topic name
- ...

And besides the message itself is also invalid (you can find this in the
gdb traces below).

So just filter out messages win an error error after poll.

SIGSEGV was with the following stacktrace:
    (gdb) bt
    3  0x0000000010f05b4d in rd_kafka_offset_store (app_rkt=0x0, partition=0, offset=0) at ../contrib/librdkafka/src/rdkafka_offset.c:656
    4  0x0000000010e69657 in cppkafka::Consumer::store_offset (this=0x7f2015210820, msg=...) at ../contrib/cppkafka/include/cppkafka/message.h:225
    5  0x000000000e68f208 in DB::ReadBufferFromKafkaConsumer::storeLastReadMessageOffset (this=0x7f206a136618) at ../contrib/libcxx/include/iterator:1508
    6  0x000000000e68b207 in DB::KafkaBlockInputStream::readImpl (this=0x7f202c689020) at ../src/Storages/Kafka/KafkaBlockInputStream.cpp:150
    7  0x000000000dd1178d in DB::IBlockInputStream::read (this=this@entry=0x7f202c689020) at ../src/DataStreams/IBlockInputStream.cpp:60
    8  0x000000000dd34c0a in DB::copyDataImpl<> () at ../src/DataStreams/copyData.cpp:21
    9  DB::copyData () at ../src/DataStreams/copyData.cpp:62
    10 0x000000000e67c8f2 in DB::StorageKafka::streamToViews () at ../contrib/libcxx/include/memory:3823
    11 0x000000000e67d218 in DB::StorageKafka::threadFunc () at ../src/Storages/Kafka/StorageKafka.cpp:488

And some information from it:

    (gdb) p this.current.__i
    $14 = (std::__1::__wrap_iter<cppkafka::Message const*>::iterator_type) 0x7f1ca8f58660

    # current-1
    (gdb) p $14-1
    $15 = (const cppkafka::Message *) 0x7f1ca8f58600
    (gdb) p $16.handle_
    $17 = {__ptr_ = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f203577f938}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f203577f938
    $24 = {err = RD_KAFKA_RESP_ERR__TRANSPORT, rkt = 0x0, partition = 0, payload = 0x7f202f0339c0, len = 63, key = 0x0, key_len = 0, offset = 0, _private = 0x7f203577f8c0}

    # current
    (gdb) p $14-0
    $28 = (const cppkafka::Message *) 0x7f1ca8f58660
    (gdb) p $28.handle_.__ptr_
    $29 = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f184f129bf0}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f184f129bf0
    $30 = {err = RD_KAFKA_RESP_ERR_NO_ERROR, rkt = 0x7f1ed44fe000, partition = 1, payload = 0x7f1fc9bc6036, len = 242, key = 0x0, key_len = 0, offset = 2394853582209,

    # current+1
    (gdb) p (*($14+1)).handle_.__ptr_
    $44 = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f184f129d30}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f184f129d30
    $45 = {err = RD_KAFKA_RESP_ERR_NO_ERROR, rkt = 0x7f1ed44fe000, partition = 1, payload = 0x7f1fc9bc612f, len = 31, key = 0x0, key_len = 0, offset = 2394853582210,
      _private = 0x7f184f129cc0}

    # distance from the beginning
    (gdb) p messages.__end_-messages.__begin_
    $34 = 65536
    (gdb) p ($14-0)-messages.__begin_
    $37 = 8965
    (gdb) p ($14-1)-messages.__begin_
    $38 = 8964

    # parsing info
    (gdb) p allowed
    $39 = false
    (gdb) p new_rows
    $40 = 1
    (gdb) p total_rows
    $41 = 8964

    # current buffer is invalid
    (gdb) p *buffer.__ptr_
    $50 = {<DB::ReadBuffer> = {<DB::BufferBase> = {pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure", bytes = 47904863385, working_buffer = {
            begin_pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure",
            end_pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure"}, internal_buffer = {

v0: check message errors in ReadBufferFromKafkaConsumer::nextImpl() (but
this may lead to using of that messages after and SIGSEGV again, doh).
v2: skip messages with an error after poll.
2020-07-10 11:41:44 +03:00
Alexey Milovidov
47eaffbe63 Additional checks 2020-07-10 11:21:40 +03:00
Alexey Milovidov
4b86f36d37 Check arguments of bloom filter index 2020-07-10 11:13:21 +03:00
alesapin
5cae87e664
Merge pull request #12335 from ClickHouse/fix_alter_exit_codes
Fix alter rename error messages
2020-07-10 11:05:20 +03:00
Peng Jian
958bb1f3aa COS (Tencent Cloud Object Storage) integration
To allow import and export to COS.
2020-07-10 15:26:55 +08:00
Alexey Milovidov
276b3a0215 Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables #11905 2020-07-10 09:30:49 +03:00
Alexey Milovidov
a4b35a8a6f Allow to CLEAR column even if there are depending DEFAULT expressions #12333 2020-07-10 08:54:35 +03:00
alexey-milovidov
c16d8e094b
Merge pull request #12308 from ClickHouse/fix-codec-bad-exception-code
Fix wrong exception code in codecs Delta, DoubleDelta #12110
2020-07-10 08:40:46 +03:00
Alexey Milovidov
afc00fa0b8 Merge branch 'master' into fix-codec-bad-exception-code 2020-07-10 04:12:24 +03:00
Alexey Milovidov
7fc90aa070 Fix error 2020-07-10 02:45:29 +03:00
Alexey Milovidov
ad6fcd57b2 Merge branch 'master' into fix-race-condition-replicated-merge-tree-queue 2020-07-10 02:21:24 +03:00
alesapin
0156f43ed3 Human readable errors in alter rename queries 2020-07-09 17:30:38 +03:00
alesapin
9dea4ab323 Initial version 2020-07-09 17:14:44 +03:00
Vladimir Chebotarev
faf6be6576
Implemented single part uploads for DiskS3 (#12026)
* Implemented single part uploads for DiskS3.
* Added `min_multi_part_upload_size` to disk configuration.
2020-07-09 17:09:17 +03:00
Alexander Tokmakov
445acd0294 Merge branch 'master' into database_atomic_improvements 2020-07-09 16:02:54 +03:00
Denis Glazachev
5a4762bb8a
Merge branch 'master' into ldap-per-user-authentication 2020-07-09 14:50:02 +04:00
alesapin
47f05dcadd
Merge pull request #12304 from CurtizJ/fix-ttl-rename
Fix TTL after renaming column.
2020-07-09 13:06:27 +03:00
Alexey Milovidov
39e79cfe3e Merge branch 'master' into fix-codec-bad-exception-code 2020-07-09 07:50:18 +03:00
Alexey Milovidov
6c458a6287 Fix race condition in ReplicatedMergeTreeQueue 2020-07-09 07:43:28 +03:00
alexey-milovidov
827990d681
Merge pull request #12305 from ClickHouse/fix-virtual-columns-filter
Fix virtual columns filter
2020-07-09 07:06:07 +03:00
Alexey Milovidov
ea970fd57c Remove bad ugliness 2020-07-09 04:00:16 +03:00
Alexey Milovidov
b78e1145e8 Fix filtering by virtual columns #12166 2020-07-09 02:52:57 +03:00
Anton Popov
0e4871eec2 fix TTL after renaming column 2020-07-09 02:25:31 +03:00
Alexey Milovidov
eaa13d8176 Fix strange code CC @Enmk. Prove: g++ -xc++ -include vector - <<< 'int main() { return std::vector<const char>{1, 2, 3}.size(); }' 2020-07-09 02:04:42 +03:00
Alexander Tokmakov
9c4efa1f36 fix, add test 2020-07-09 01:50:15 +03:00
tavplubix
33c3545125
Merge pull request #12197 from nikitamikhaylov/csv-file-bugfix
Headers for CSVWithNames in StorageFile
2020-07-08 20:42:49 +03:00
alesapin
84f8bf1e14
Merge pull request #10697 from CurtizJ/polymorphic-parts
Polymorphic parts (in-memory format)
2020-07-08 13:25:45 +03:00
alexey-milovidov
ffdd6e1af6
Merge pull request #12173 from nikitamikhaylov/summing-bug-fix
Exclude partition key columns from SummingMergeTree
2020-07-08 01:46:12 +03:00
Denis Glazachev
9effacfbc1 Merge branch 'master' into ldap-per-user-authentication
* master: (1102 commits)
  Update README.md
  Update README.md
  Update README.md
  Update index.md
  [docs] add intrdocution for statements page (#12189)
  Revert "Run perf tests with memory sampling (for allocations >1M)"
  Sanitize LINK_LIBRARIES property for the directories (#12160)
  [docs] refactor Domains overview (#12186)
  DOCS-647: toStartOfSecond (#12190)
  [docs] add intrdocution for commercial page (#12187)
  DOCSUP-1348 Russian translation for new functions (#133) (#12194)
  changelog fixes
  Update index.md (#12191)
  Update zh kafka.md title (#12192)
  Added test for #3767
  style fix for #12152
  Tests for fixed issues #10846 and #7347
  changelog fixes
  [docs] introduction for special table engines (#12170)
  [docs] introduction for third-party interfaces (#12175)
  ...

# Conflicts:
#	src/Access/ya.make
#	src/Common/ErrorCodes.cpp
2020-07-08 00:42:09 +04:00
alexey-milovidov
546fcc9ed6
Merge pull request #12151 from ClickHouse/fix-transform-query-aliases
Fix transform query for external databases in presense of aliases
2020-07-07 21:46:35 +03:00
Nikita Mikhaylov
270551e599 done 2020-07-07 14:45:20 +03:00
Anton Popov
416d9648c2 remove questionable functionality 2020-07-07 12:58:14 +03:00
tavplubix
488a8cbc9f
Merge pull request #12120 from filimonov/query_context_for_system_logs
Add query context for system logs and to Buffer
2020-07-07 09:55:20 +03:00
Mikhail Filimonov
93517b4e82 Same change for Kafka - just in case, and to make it conform. 2020-07-06 20:48:33 +02:00
alesapin
3f90f65678 Merge remote-tracking branch 'origin' into CurtizJ-polymorphic-parts 2020-07-06 21:34:17 +03:00
Nikita Mikhaylov
2b539e6ace fix style 2020-07-06 20:26:15 +03:00
Mikhail Filimonov
8038383f06 Fix #10437, CR fixes 2020-07-06 19:24:33 +02:00
Nikita Mikhaylov
d31ed58f01 done 2020-07-06 17:33:31 +03:00
Alexander Tokmakov
d1be5ec641 fix symlinks, add short syntax of attach database 2020-07-06 16:41:43 +03:00
Alexander Kuzmenkov
d648628a4b
Merge pull request #12075 from azat/StorageKafka-SIGSEGV-fix
Fix SIGSEGV in StorageKafka on DROP TABLE
2020-07-06 13:56:06 +03:00
Alexey Milovidov
95a7a09c37 Fix transform query for external databases in presense of aliases #12032 2020-07-06 04:50:45 +03:00
alexey-milovidov
ea0fb005fb
Merge pull request #12116 from vitlibar/fix-table-dictionary-dependency
Fix handling dictionary-table dependency
2020-07-06 04:19:43 +03:00
alexey-milovidov
eecf7ae3ee
Merge pull request #12140 from ClickHouse/fix-division
Fix potential overflow in integer division
2020-07-05 19:00:41 +03:00
myrrc
8c3417fbf7
ILIKE operator (#12125)
* Integrated CachingAllocator into MarkCache

* fixed build errors

* reset func hotfix

* upd: Fixing build

* updated submodules links

* fix 2

* updating grabber allocator proto

* updating lost work

* updating CMake to use concepts

* some other changes to get it building (integration into MarkCache)

* further integration into caches

* updated Async metrics, fixed some build errors

* and some other errors revealing

* added perfect forwarding to some functions

* fix: forward template

* fix: constexpr modifier

* fix: FakePODAllocator missing member func

* updated PODArray constructor taking alloc params

* fix: PODArray overload with n restored

* fix: FakePODAlloc duplicating alloc() func

* added constexpr variable for alloc_tag_t

* split cache values by allocators, provided updates

* fix: memcpy

* fix: constexpr modifier

* fix: noexcept modifier

* fix: alloc_tag_t for PODArray constructor

* fix: PODArray copy ctor with different alloc

* fix: resize() signature

* updating to lastest working master

* syncing with 273267

* first draft version

* fix: update Searcher to case-insensitive

* added ILIKE test

* fixed style errors, updated test, split like and ilike,  added notILike

* replaced inconsistent comments

* fixed show tables ilike

* updated missing test cases

* regenerated ya.make

* Update 01355_ilike.sql

Co-authored-by: myrrc <me-clickhouse@myrrec.space>
Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
2020-07-05 18:57:59 +03:00
alexey-milovidov
cb126a23ef
Update StorageDictionary.h 2020-07-05 18:45:05 +03:00
alexey-milovidov
1a760e18a5
Update StorageDictionary.h 2020-07-05 18:44:28 +03:00
Vitaly Baranov
99e9b15e00 Make code clearer: use enum instead of bool internal. 2020-07-05 17:14:29 +03:00
Alexey Milovidov
73a5c38398 Fix potential overflow in integer division #12119 2020-07-05 03:29:03 +03:00
alexey-milovidov
c696354dd4
Merge pull request #12115 from ianton-ru/disk-type-in-system-disks
Add type column in system.disks
2020-07-05 01:04:17 +03:00
alexey-milovidov
e05283d5d3
Merge pull request #12060 from ClickHouse/fix-12053
Check wrong type for filter.
2020-07-04 23:46:34 +03:00
Anton Popov
73676f5022
Improve performace of reading in order of sorting key. (#11696)
* simplify reading in order of sorting key

* add perf test for reading many parts

* Revert "simplify reading in order of sorting key"

This reverts commit 7267d7c46e.

* add threshold for preliminary merge for reading in order

* better threshold

* limit threads in test
2020-07-04 15:48:51 +03:00
alesapin
a2b6d58053
Merge pull request #11069 from kssenii/add-storage-rabbitmq-read-only
Add storage RabbitMQ
2020-07-04 10:38:50 +03:00
alesapin
bfa8cdc7a4
Move skip lists for tests to skip_list.json file (#12107)
* Add unbundled mode flag

* Move skip lists to clickhouse-test

* More verbose message about skip

* Make skip-list optional

* Update clickhouse-test
2020-07-04 10:35:45 +03:00
alesapin
8dc204350f
Fix version column in replicated version collapsing merge tree (#12121) 2020-07-04 10:35:17 +03:00
alexey-milovidov
6677e0a503
Merge pull request #12073 from zhang2014/feature/atfer_column_modify_column
ISSUES-4006 support first for ALTER ADD|MODIFY COLUMN
2020-07-03 22:54:05 +03:00
Vitaly Baranov
ab343132de Fix handling dependency of table with ENGINE=Dictionary on dictionary. 2020-07-03 22:05:53 +03:00
Anton Ivashkin
23b44ca6fe Add type column in system.disks 2020-07-03 15:45:54 +03:00
alesapin
0a6f3ca9fd Add unbundled mode flag 2020-07-03 13:11:16 +03:00
alesapin
c57edd2018 Tiny fixes 2020-07-03 11:02:35 +03:00
Azat Khuzhin
bd5e5e9462 kafka: remove outdated comment
As stated by @filimonov it is not relevant (after #11599)
2020-07-03 09:23:39 +03:00
Azat Khuzhin
de8bc99d48 kafka: avoid superior polling after DROP/DETACH TABLE
Before this patch isStalled() was checked before polledDataUnusable(),
and after DROP TABLE isStalled() == true (although this looks tricky).
2020-07-03 09:23:39 +03:00
Azat Khuzhin
8508200020 kafka: improve logging during engine shutdown
This will help with tracking possible issues, when you need to know was
buffer released or not.
2020-07-03 09:23:39 +03:00
Azat Khuzhin
e7179c402c kafka: check that the data is still usable after parsing 2020-07-03 09:23:38 +03:00
Azat Khuzhin
6104872cae kafka: fix SIGSEGV on DROP TABLE
After #11599 it is possible that messages of the
ReadBufferFromKafkaConsumer will be cleaned-up right in
read_kafka_message callback (from KafkaBlockInputStream) if the stop
flag isset (i.e. DROP TABLE is waiting the consumer), and if
read_kafka_message already processed some rows it will not return 0 and
the loop after will try to get current topic from the buffer, which uses
messages in the underlying and this will got SIGSEGV:

    12:14:56.173262 [ 55421 ] {f7930856-d478-4e41-af56-24ce7b693e95} <Debug> executeQuery: (from 0.0.0.0:0, user: ) DROP TABLE IF EXISTS data.queue
    12:14:56.173285 [ 55421 ] {f7930856-d478-4e41-af56-24ce7b693e95} <Trace> StorageKafka (newly_queue): Waiting for cleanup
    12:14:56.180016 [ 55390 ] {} <Trace> BaseDaemon: Received signal 11
    12:14:56.180267 [ 4914 ] {} <Fatal> BaseDaemon: ########################################
    12:14:56.181879 [ 4914 ] {} <Fatal> BaseDaemon: (version 20.6.1.1, build id: 4CE0298F08583658) (from thread 55468) (no query) Received signal Segmentation fault (11)
    12:14:56.181900 [ 4914 ] {} <Fatal> BaseDaemon: Address: 0x8 Access: read. Address not mapped to object.
    12:14:56.181909 [ 4914 ] {} <Fatal> BaseDaemon: Stack trace:
    12:14:56.184676 [ 4914 ] {} <Fatal> BaseDaemon: 3. /ch/contrib/cppkafka/include/cppkafka/message.h:111: DB::KafkaBlockInputStream::readImpl() @ 0xe343f1c in /usr/lib/debug/usr/bin/clickhouse
    12:14:56.185553 [ 4914 ] {} <Fatal> BaseDaemon: 4. /ch/contrib/libcxx/include/vector:1003: DB::IBlockInputStream::read() @ 0xd9d95bd in /usr/lib/debug/usr/bin/clickhouse
    12:14:56.188238 [ 4914 ] {} <Fatal> BaseDaemon: 5. /ch/src/DataStreams/copyData.cpp:26: DB::copyData() @ 0xd9f712a in /usr/lib/debug/usr/bin/clickhouse
    12:14:56.188780 [ 4914 ] {} <Fatal> BaseDaemon: 6. /ch/contrib/libcxx/include/vector:1532: DB::StorageKafka::streamToViews() @ 0xe335e73 in /usr/lib/debug/usr/bin/clickhouse
    12:14:56.189331 [ 4914 ] {} <Fatal> BaseDaemon: 7. /ch/src/Storages/Kafka/StorageKafka.cpp:491: DB::StorageKafka::threadFunc() @ 0xe336738 in /usr/lib/debug/usr/bin/clickhouse

55421 thread (shows that it still waiting for deactivation):

    5  std::__1::lock_guard<>::lock_guard () at ../contrib/libcxx/include/__mutex_base:90
    6  DB::BackgroundSchedulePoolTaskInfo::deactivate (this=0x7fc7e4465f20) at ../src/Core/BackgroundSchedulePool.cpp:59
    7  DB::StorageKafka::shutdown (this=0x7fc7e45e4600) at ../contrib/libcxx/include/memory:3821

And just in case thread where read_kafka_message is called:

    0  DB::ReadBufferFromKafkaConsumer::nextImpl (this=0x7fd4901d4118) at ../contrib/libcxx/include/atomic:1491
    1  DB::ReadBuffer::next (this=0x7fd4901d4118) at ../src/IO/ReadBuffer.h:59
    2  DB::ReadBuffer::eof (this=0x7fd4901d4118) at ../src/IO/ReadBuffer.h:81
    3  DB::skipWhitespaceIfAny (buf=...) at ../src/IO/ReadHelpers.h:945
    4  DB::JSONEachRowRowInputFormat::readRow (ext=..., columns=..., this=0x7fd499a7a020) at ../src/Processors/Formats/Impl/JSONEachRowRowInputFormat.cpp:222
    5  DB::JSONEachRowRowInputFormat::readRow (this=0x7fd499a7a020, columns=..., ext=...) at ../src/Processors/Formats/Impl/JSONEachRowRowInputFormat.cpp:218
    6  DB::IRowInputFormat::generate (this=0x7fd499a7a020) at ../src/Processors/Formats/IRowInputFormat.cpp:64
    7  DB::ISource::work (this=0x7fd499a7a020) at ../src/Processors/ISource.cpp:48
    8  DB::KafkaBlockInputStream::<lambda()>::operator()(void) const () at ../contrib/libcxx/include/memory:3826
    9  DB::KafkaBlockInputStream::readImpl (this=0x7fd46e718820) at ../contrib/libcxx/include/new:340

Cc: @filimonov
2020-07-03 09:22:44 +03:00
Alexander Tokmakov
383c583bdd add uuid to atomic databases 2020-07-02 23:39:31 +03:00
Anton Popov
4422df2e37 Merge remote-tracking branch 'upstream/master' into HEAD 2020-07-02 20:18:21 +03:00
alesapin
c6c7ee30d9 Less race conditions 2020-07-02 19:44:04 +03:00
alesapin
96df2e6b71 Better shutdown and conversion 2020-07-02 17:35:10 +03:00
alexey-milovidov
82061da77c
Merge pull request #12040 from azat/dist-fixes
Tiny fixes for distributed queries
2020-07-02 17:02:56 +03:00
alesapin
64583ceb22 Merge branch 'master' into add-storage-rabbitmq-read-only 2020-07-02 16:08:29 +03:00
Anton Popov
71059e4dff
Merge pull request #12062 from nvartolomei/nv/set-index-tuple-types
Try fix pk in tuple performance
2020-07-02 15:51:03 +03:00
Nikolai Kochetov
79cd33a567 Fix tests. 2020-07-02 10:44:47 +03:00
Alexander Kazakov
cc2cadb7f5
Merge pull request #11893 from excitoon-favorites/autostartmoves
In *MergeTree: Parts moving task shall be started if new storage policy needs them
2020-07-02 10:44:38 +03:00
zhang2014
9ed5c6d925 ISSUES-4006 support first for ALTER ADD|MODIFY COLUMN 2020-07-01 22:58:52 +08:00
Nicolae Vartolomei
3854ce6d84 Rewrite Set lookup to make it more readable 2020-07-01 15:05:54 +01:00
Anton Popov
68c9896fa2 fix arcadia build 2020-07-01 00:15:39 +03:00
Anton Popov
d45697a1b5 in-memory-parts: lazy creation of WAL 2020-06-30 21:47:12 +03:00
Nikolai Kochetov
3585700506 Fix tests. 2020-06-30 19:41:43 +03:00
Vitaly Baranov
c39eb8f71b Fix partial revokes (complex cases). 2020-06-30 18:47:02 +03:00
Nicolae Vartolomei
8f1845185e Try fix pk in tuple performance
Possible approach for fixing #10574

The problem is that prepared sets are built correctly, it is a hash map of key -> set
where key is a hash of AST and list of data types (when we a list of
tuples of literals).

However, when the key is built from the index to try and find if there
exists a prepared set that would match it looks for data types of the
primary key (see how data_types is populated) because the primary key
has only one field (v in my example) it can not find the prepared set.

The patch looks for any prepared indexes where data types match for the
subset of fields found in primary key, we are not interested in other
fields anyway for the purpose of primary key pruning.
2020-06-30 16:33:38 +01:00
Nikolai Kochetov
66da0733ab Check type of filter for prewhere. 2020-06-30 17:20:27 +03:00
Vladimir Chebotarev
bb8da71eff Moves task shall be started if new storage policy needs them. 2020-06-30 15:36:44 +03:00
kssenii
f797efb04c Fix build 2020-06-30 01:48:11 +00:00
Anton Popov
53e955c6dd several fixes 2020-06-29 23:36:18 +03:00
Azat Khuzhin
9c94993f14 Fix "Sharding key is not deterministic" message 2020-06-29 23:00:14 +03:00
kssenii
fd9b416871 Fix and simplify code 2020-06-29 15:47:25 +00:00
Anton Popov
a43cb93be5 remove questionable functionality 2020-06-29 18:46:50 +03:00
alesapin
718262e7ce
Merge pull request #11973 from ClickHouse/alter-enum-partition-key
Allow to perform "metadata-only" ALTER of partition key.
2020-06-29 16:01:07 +03:00
kssenii
88ece429c9 Move writing to RabbitMQ into background task 2020-06-29 12:33:01 +00:00