Commit Graph

5300 Commits

Author SHA1 Message Date
Vladimir Chebotarev
5cbbcd9cdb Added disk info to system.detached_parts. 2019-11-19 09:44:10 +03:00
Vitaly Baranov
e40c140982 Add the ignorable flag for the settings. 2019-11-17 03:56:18 +03:00
Vitaly Baranov
f3d72b9ec1 Skip unknown settings with warnings. 2019-11-17 03:51:58 +03:00
Vitaly Baranov
ff6cba192b Replace pointer with reference in SettingsCollection<T>::MemberInfos::findStrict().
Rename SettingsCommon.h -> SettingsCollection.h for consistency.
2019-11-17 03:51:51 +03:00
Alexander Kuzmenkov
723e02fef7
Merge pull request #7759 from CurtizJ/fix-order-by
Fix order by in case of sorting by primary key prefix and non primary key suffix.
2019-11-15 20:52:31 +03:00
CurtizJ
475356f2b7 more clarifying names to avoid mistakes 2019-11-15 17:03:42 +03:00
Nikolai Kochetov
caad7e636e Use shared_ptr for storage in StorageFileBlockInputStream. 2019-11-13 15:28:14 +03:00
Nikolai Kochetov
943dd12a96 Use shared_ptr for storage in StorageFileBlockInputStream. 2019-11-13 15:17:31 +03:00
alesapin
c74538153f Fix use of destroyed variable captured in lambda 2019-11-11 11:40:00 +03:00
robot-clickhouse
94c7719c73 Auto version update to [19.18.1.1] [54429] 2019-11-08 11:36:41 +03:00
alexey-milovidov
7f01fd13b3
Merge pull request #7624 from azat/_shard_num
[RFC] Add _shard_num virtual column for the Distributed engine
2019-11-08 00:55:41 +03:00
alexey-milovidov
a2e79cc427
Merge pull request #7574 from ClickHouse/processors-4
Fix tests for processors
2019-11-08 00:46:30 +03:00
alesapin
18e59f2771 Remove some functions from mutations interpreter 2019-11-07 11:40:36 +03:00
Azat Khuzhin
0677ae048c Wrap _shard_num with toUInt32 for simpler JOIN with system.clusters.shard_num 2019-11-06 21:02:42 +03:00
Azat Khuzhin
92bd96fc0d Simplify buildWhereExpression() by using makeASTFunction() helper 2019-11-06 20:37:30 +03:00
alesapin
8c7deaa70d More safier, but still ugly mutations interpreter 2019-11-06 20:28:03 +03:00
Azat Khuzhin
81aeff2d2a Add _shard_num virtual column for the Distributed engine
With JOIN from system.clusters one can figure out from which server data
came.

TODO:
- optimization to avoid communicating with unrelated shards (for queries
  like "AND _shard_num = n")
- fix aliases (see tests with serverError expected)

v0: AddingConstColumnBlockInputStream
v2: VirtualColumnUtils::rewriteEntityInAst
v3: fix remote(Distributed) by appending _shard_num only if has been requested
2019-11-06 15:26:12 +03:00
Alexander Kuzmenkov
233212ac68
Merge pull request #7531 from amosbird/getkeymapped
Unify hash tables interface (separated for review)
2019-11-06 13:49:39 +03:00
alexey-milovidov
687be5f7af
Merge pull request #7618 from excitoon-favorites/looks-like-wrong-copy-paste
Fixed exception in case of using 1 argument while defining S3, URL and HDFS storages
2019-11-06 02:11:38 +03:00
alexey-milovidov
56c89349d3
Merge pull request #7639 from CurtizJ/final_mark_without_primary_key
Fix final mark with empty primary key.
2019-11-05 22:53:52 +03:00
Alexey Milovidov
9ac4e4c7fb Little better #7600 2019-11-05 22:31:07 +03:00
alexey-milovidov
1bfade54c2
Merge pull request #7600 from azat/DirectoryMonitor-current_batch.txt-corruption
Write current batch for distributed send atomically (using .tmp + rename)
2019-11-05 22:24:15 +03:00
CurtizJ
3d968b0259 fix final mark with empty primary key 2019-11-05 20:42:35 +03:00
Nikolai Kochetov
055f21c9b7 Less wrappers for procesors pipeline. 2019-11-05 20:33:03 +03:00
Amos Bird
fbfbe161ec
Unify hash tables interface. 2019-11-06 00:08:04 +08:00
Azat Khuzhin
4dfffdd24a Write current batch for distributed send atomically (using .tmp + rename)
Otherwise the following can happen after reboot:

    2019.11.01 11:46:12.217143 [ 187 ] {} <Error> dist.Distributed.DirectoryMonitor: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected \n before: S\'^A\0^]\0\0<BE>4^A\0r<87>\0\0<A2><D7>^D^Y\0<F2>{^E<CD>\0\0Hy\0\0<F2>^_^C\0^_&\0\0<FF><D3>\0\0
    <8D><91>\0\0<C0>9\0\0<C0><B0>^A\0^G<AA>\0\0<B5><FE>^A\0<BF><A7>^A\0<9B><CB>^A\0I^R^A\0<B7><AB>^A\0<BC><8F>\0\0˲^B\0Zy\0\0<94><AA>\0\0<98>
    <8F>\0\0\f<A5>\0\0^QN\0\0<E3><C6>\0\0<B1>6^B\0ɳ\0\0W<99>\0\0<B9><A2>\0\0:<BB>\0\0)<B1>\0\0#<8B>\0\0aW\0\0<ED>#\0\0<F1>@\0\0ˀ^B\0<D7><FC>\0\0<DF>, Stack trace:

    0. 0x559e27222e60 StackTrace::StackTrace() /usr/bin/clickhouse
    1. 0x559e27222c45 DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) /usr/bin/clickhouse
    2. 0x559e26de4473 ? /usr/bin/clickhouse
    3. 0x559e272494b5 DB::assertString(char const*, DB::ReadBuffer&) /usr/bin/clickhouse
    4. 0x559e2a5dab45 DB::StorageDistributedDirectoryMonitor::processFilesWithBatching(std::map<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) /usr/bin/clickhouse
    5. 0x559e2a5db5fa DB::StorageDistributedDirectoryMonitor::processFiles() /usr/bin/clickhouse
    6. 0x559e2a5dba78 DB::StorageDistributedDirectoryMonitor::run() /usr/bin/clickhouse
    7. 0x559e2a5ddbbc ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::StorageDistributedDirectoryMonitor::*)(), DB::StorageDistributedDirectoryMonitor*>(void (DB::StorageDistributedDirectoryMonitor::*&&)(), DB::StorageDistributedDirectoryMonitor*&&)::{lambda()#1}::operator()() const /usr/bin/clickhouse
    8. 0x559e2726b07c ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
    9. 0x559e2bbc3640 ? /usr/bin/clickhouse
    10. 0x7fbd62b3cfb7 start_thread /lib/x86_64-linux-gnu/libpthread-2.29.so
    11. 0x7fbd62a692ef __clone /lib/x86_64-linux-gnu/libc-2.29.so
     (version 19.17.1.1)

v2: remove fsync, to avoid possible stalls (https://github.com/ClickHouse/ClickHouse/pull/7600#discussion_r342010874)
2019-11-05 00:24:38 +03:00
alexey-milovidov
5aceca9e17
Merge pull request #7615 from amosbird/fix21
Global context should be unique.
2019-11-05 00:16:37 +03:00
Vladimir Chebotarev
9869ee141c Fixed exception in case of using 1 argument while defining S3, URL and HDFS storages. 2019-11-04 20:11:50 +03:00
Amos Bird
e2cfc3ecab
Global context should be unique. 2019-11-04 23:43:13 +08:00
alexey-milovidov
b261e6033a
Merge pull request #7602 from excitoon-favorites/cloneAndLoadDataPartOnSameDisk
Made `MergeTreeData::cloneAndLoadDataPart` only work for the same disk.
2019-11-04 14:42:30 +03:00
zhang2014
08894484ee fix cluster system is_local 2019-11-04 10:56:12 +08:00
Vladimir Chebotarev
e76bbfc5ad Made MergeTreeData::cloneAndLoadDataPart only work for the same disk. 2019-11-04 01:27:05 +03:00
alexey-milovidov
15c4a19bb1
Merge pull request #7585 from ernestp/macos_catalina_2019_11_01
Fixed compile errors on macOS Catalina
2019-11-02 15:46:17 +03:00
alexey-milovidov
6e4d63e394
Merge pull request #7575 from Alex-Burmak/escaping_fix
Fixed missing file name escaping in FREEZE command
2019-11-02 13:20:28 +03:00
alexey-milovidov
ad01f7b1ac
Merge pull request #7552 from azat/do-not-account-memory-for-Buffer-in-max_memory_usage
[RFC] Do not account memory for Buffer engine in max_memory_usage limit
2019-11-02 00:57:24 +03:00
alexey-milovidov
dda93e2275
Merge pull request #7561 from ClickHouse/achimbab-master
Merge for #7363
2019-11-02 00:57:13 +03:00
Ernest Poletaev
de1e5d0e53 Fixed compile errors on macOS Catalina 2019-11-01 23:33:43 +07:00
Nikolai Kochetov
239d92a94c Code cleanup. 2019-11-01 18:31:02 +03:00
alexey-milovidov
4081b0be90
Merge pull request #7497 from amosbird/countopt
Early constant folding.
2019-11-01 16:54:02 +03:00
Alexander Burmak
9b8fc9a899 Fixed missing file name escaping in FREEZE command 2019-11-01 16:17:08 +03:00
Ivan
21db9157f7
Don't initialize some constant blocks in a loop (#7475) 2019-11-01 14:34:29 +03:00
Nikolai Kochetov
388bbb950b Add flag to set that set is created. 2019-11-01 14:03:35 +03:00
Nikolai Kochetov
1f7a798c97 Add flag to set that set is created. 2019-11-01 13:58:29 +03:00
alesapin
6ef0a92535
Merge pull request #7558 from excitoon/patch-1
Made mutation to choose the same disk in `ReplicatedMergeTree`.
2019-11-01 13:52:45 +03:00
Nikolai Kochetov
d31cac33b2 Small fixes. 2019-11-01 12:41:20 +03:00
Nikolai Kochetov
5bb47e2484
Merge pull request #7181 from ClickHouse/processors-and-storages
Processors and storages
2019-11-01 12:04:49 +03:00
Azat Khuzhin
dbe45800d9 Do not account memory for Buffer engine in max_memory_usage limit
Since background flush will not be accounted there, and it can be too
tricky to calclulate this limit, in case you have multiple materialized
views with Buffer engine.

v2: test adjustment
2019-10-31 22:26:50 +03:00
Nikolai Kochetov
9a5a0a2a3b Fix types for set elements. 2019-10-31 19:14:06 +03:00
Vitaly Baranov
56011d4649
Merge pull request #7553 from vitlibar/add-constraints-columns-to-table-system-settings
Add constraints columns to table system.settings
2019-10-31 19:06:46 +03:00
Amos Bird
e04cdd4ebb
Early constant folding. 2019-10-31 23:54:32 +08:00