Commit Graph

2222 Commits

Author SHA1 Message Date
alesapin
294489f6ad Merge branch 'master' into nvartolomei-drop-part 2020-11-03 10:19:03 +03:00
alesapin
01898be459
Merge pull request #16606 from ClickHouse/better_serialize_last_index_row
Simplier serialization of last index column
2020-11-03 09:59:50 +03:00
Anton Popov
a3a8e18637
Merge branch 'master' into select_final 2020-11-03 00:00:43 +03:00
Alexander Kuzmenkov
f10a5207f4
Merge pull request #16601 from ClickHouse/ban_aggregate_function_in_primary_key
Restrict to use non-comparable types in primary key
2020-11-02 23:27:46 +03:00
Alexey Milovidov
e6d8ab2270 Fix possible name collision in ALTER 2020-11-02 21:37:23 +03:00
alesapin
dac6705995 DROP PART and clear blocks in a single zookeeper op 2020-11-02 20:30:59 +03:00
Alexander Tokmakov
ac32809b6a fix #16482 2020-11-02 19:40:39 +03:00
alesapin
364607d87d Merge with master 2020-11-02 19:18:18 +03:00
alesapin
67d22b3e57 Merge branch 'master' into nvartolomei-drop-part 2020-11-02 19:09:09 +03:00
Alexander Kuzmenkov
548ac9d57b Merge remote-tracking branch 'origin/master' into HEAD 2020-11-02 17:37:30 +03:00
alesapin
7f8560e0c0
Merge pull request #16538 from amosbird/fp2
Allow fetching duplicate parts to detach
2020-11-02 16:10:42 +03:00
feng lv
4d722bc52c fix conflict 2020-11-02 12:52:12 +00:00
alesapin
fbda80ac89 Simplier storage of last index column 2020-11-02 15:19:37 +03:00
alesapin
360548180c Remove redundant include 2020-11-02 14:42:25 +03:00
alesapin
f3b3025719 Ban non comparable types in primary key 2020-11-02 14:39:27 +03:00
feng lv
1a34abadbc fix
fix

fix
2020-11-02 10:46:58 +00:00
alesapin
8b0d9fbc07 Merge branch 'no_background_pool_no_more' into add_separate_pool_for_fetches 2020-11-02 10:54:09 +03:00
Alexander Kuzmenkov
99ee127620 Support SETTINGS clause for File engine
Accept the usual user settings related to file formats.

Most of the diff are the mechanistic code changes required to allow
providing the required FormatSettings to the format factory. The File
engine then extracts these settings from the `CREATE` query, and specifies
them when creating the format parser.
2020-11-02 10:50:38 +03:00
alesapin
101aa9e931 Merge branch 'master' into no_background_pool_no_more 2020-11-02 10:49:19 +03:00
feng lv
3dce3c6a21 fix 2020-11-02 05:28:37 +00:00
alesapin
ae53092536 Merge branch 'master' into system_fetches_table 2020-10-31 18:45:17 +03:00
tavplubix
db146ee615
Merge pull request #16555 from ClickHouse/yet_another_fix_for_00993
Better logging in replication queue, fix flacky test
2020-10-31 14:38:15 +03:00
Azat Khuzhin
e07473f1ea Update comment for StorageSystemErrors 2020-10-31 11:29:17 +03:00
tavplubix
ce6c44eb9f
Update ReplicatedMergeTreeQueue.cpp 2020-10-30 18:47:58 +03:00
Alexander Tokmakov
cf8202d36e better logging, fix flacky test 2020-10-30 15:41:39 +03:00
alesapin
be183027b3
Merge pull request #16516 from zlobober/remove_g0
Remove -g0 form Arcadia build settings.
2020-10-30 13:58:08 +03:00
alesapin
15ba4dd851 Review fix 2020-10-30 11:52:11 +03:00
alesapin
b34960bffa Merge branch 'master' into system_fetches_table 2020-10-30 11:33:37 +03:00
Azat Khuzhin
3661769e1b Remove some absolute changes for errorCodeToName/system.errors 2020-10-30 09:04:22 +03:00
Amos Bird
18c5abc44e
Allow fetching duplicate parts to detach 2020-10-30 10:55:50 +08:00
Azat Khuzhin
ce9897bfd8 Fix readability-container-size-empty in StorageSystemErrors.cpp 2020-10-30 00:07:40 +03:00
Nikolai Kochetov
1c106691b5
Merge pull request #16423 from amosbird/jbodread
Balanced reading from JBOD
2020-10-29 19:22:45 +03:00
Maxim Akhmedov
3627fabfb9 Remove -g0 form Arcadia build settings. 2020-10-29 17:37:23 +03:00
alesapin
0e07afb821 Merge branch 'no_background_pool_no_more' into add_separate_pool_for_fetches 2020-10-29 12:53:55 +03:00
alesapin
40fc512e79 Merge branch 'master' into no_background_pool_no_more 2020-10-29 12:53:34 +03:00
Azat Khuzhin
b42f77a791 Covert error codes list to lookup table and drop generation of them. 2020-10-29 10:55:41 +03:00
Azat Khuzhin
b2e2322895 Add system.errors table
Contains error codes with number of times they have been triggered.

Columns:

-   `name` ([String](../../sql-reference/data-types/string.md)) — name of the error (`errorCodeToName`).
-   `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — code number of the error.
-   `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) - number of times this error has been happened.

**Example**

``` sql
SELECT *
FROM system.errors
WHERE value > 0
ORDER BY code ASC
LIMIT 1

┌─name─────────────┬─code─┬─value─┐
│ CANNOT_OPEN_FILE │   76 │     1 │
└──────────────────┴──────┴───────┘
2020-10-29 10:55:38 +03:00
Nikolai Kochetov
671d2b7f1b
Update MergeTreeReadPool.cpp
Fix comment
2020-10-29 10:04:23 +03:00
alexey-milovidov
0faf2bc7e3
Merge pull request #16332 from ClickHouse/fix-queue-processing-of-very-large-entries
Fix processing of very large entries in queue
2020-10-29 09:09:29 +03:00
alexey-milovidov
bf3acecf6f
Merge pull request #16032 from Avogar/mysql_bug
Don't touch MySQL database if it's unnecessary
2020-10-29 04:14:26 +03:00
Nikolai Kochetov
10bad32fb4 Refactor code a little bit. Add comment. 2020-10-29 00:52:26 +03:00
Amos Bird
f995ef9797
Balanced reading from JBOD 2020-10-29 04:05:07 +08:00
alesapin
57c3935a26
Merge pull request #16426 from kssenii/rabbit-optimize
Optimize rabbitmq engine
2020-10-28 22:24:22 +03:00
alesapin
9830ff1003
Merge pull request #16094 from nvartolomei/nv/wal-metadata-compatibility
RFC: Add metadata section to MergeTreeWriteAheadLog
2020-10-28 15:54:46 +03:00
alesapin
8e8bdeb5d7
Merge pull request #16434 from ClickHouse/fix_fake_race_on_merges_list
Fix fake race condition on system.merges merge_algorithm
2020-10-28 15:51:53 +03:00
alesapin
0931658c2f Merge branch 'master' into add_separate_pool_for_fetches 2020-10-28 14:20:56 +03:00
tavplubix
cd70dc82cd
Merge pull request #16409 from azat/drop-distributed-fix
Fix DROP TABLE for Distributed (racy with INSERT)
2020-10-28 14:10:32 +03:00
alesapin
3c31a5134e Fix bug 2020-10-28 14:03:26 +03:00
tavplubix
4a63f1271b
Merge pull request #16244 from ClickHouse/fix_race_data_parts_exchange_endpoint
Fix race on StorageReplicatedMergeTree::data_parts_exchange_endpoint
2020-10-28 13:25:55 +03:00
alesapin
c10370f98d Merge branch 'master' into fix-queue-processing-of-very-large-entries 2020-10-28 11:19:34 +03:00
alesapin
617e42ddb4
Merge branch 'master' into rabbit-optimize 2020-10-28 10:24:05 +03:00
alesapin
1c9e24b5e2 Merge branch 'master' into system_fetches_table 2020-10-28 10:20:04 +03:00
kssenii
4b59882c30 Remove redundant, add virt col 2020-10-27 20:34:31 +00:00
Alexander Kuzmenkov
6509f1eb39
Merge branch 'master' into minumum 2020-10-27 21:38:23 +03:00
Azat Khuzhin
fc14fde24a Fix DROP TABLE for Distributed (racy with INSERT)
<details>

```

drop() on T1275:

    0  DB::StorageDistributed::drop (this=0x7f9ed34f0000) at ../contrib/libcxx/include/__hash_table:966
    1  0x000000000d557242 in DB::DatabaseOnDisk::dropTable (this=0x7f9fc22706d8, context=..., table_name=...)
       at ../contrib/libcxx/include/new:340
    2  0x000000000d6fcf7c in DB::InterpreterDropQuery::executeToTable (this=this@entry=0x7f9e42560dc0, query=...)
       at ../contrib/libcxx/include/memory:3826
    3  0x000000000d6ff5ee in DB::InterpreterDropQuery::execute (this=0x7f9e42560dc0) at ../src/Interpreters/InterpreterDropQuery.cpp:50
    4  0x000000000daa40c0 in DB::executeQueryImpl (begin=<optimized out>, end=<optimized out>, context=..., internal=<optimized out>,
       stage=DB::QueryProcessingStage::Complete, has_query_tail=false, istr=0x0) at ../src/Interpreters/executeQuery.cpp:420
    5  0x000000000daa59df in DB::executeQuery (query=..., context=..., internal=internal@entry=false, stage=<optimized out>,
       may_have_embedded_data=<optimized out>) at ../contrib/libcxx/include/string:1487
    6  0x000000000e1369e6 in DB::TCPHandler::runImpl (this=this@entry=0x7f9ddf3a9000) at ../src/Server/TCPHandler.cpp:254
    7  0x000000000e1379c9 in DB::TCPHandler::run (this=0x7f9ddf3a9000) at ../src/Server/TCPHandler.cpp:1326
    8  0x000000001086fac7 in Poco::Net::TCPServerConnection::start (this=this@entry=0x7f9ddf3a9000)
       at ../contrib/poco/Net/src/TCPServerConnection.cpp:43
    9  0x000000001086ff2b in Poco::Net::TCPServerDispatcher::run (this=0x7f9e4eba5c00)
       at ../contrib/poco/Net/src/TCPServerDispatcher.cpp:114
    10 0x00000000109dbe8e in Poco::PooledThread::run (this=0x7f9e4a2d2f80) at ../contrib/poco/Foundation/src/ThreadPool.cpp:199
    11 0x00000000109d78f9 in Poco::ThreadImpl::runnableEntry (pThread=<optimized out>)
       at ../contrib/poco/Foundation/include/Poco/SharedPtr.h:401
    12 0x00007f9fc3cccea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
    13 0x00007f9fc3bebeaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

StorageDistributedDirectoryMonitor on T166:

    0  DB::StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor (this=0x7f9ea7ab1400, storage_=..., path_=...,
       pool_=..., monitor_blocker_=..., bg_pool_=...) at ../src/Storages/Distributed/DirectoryMonitor.cpp:81
    1  0x000000000dbf684e in std::__1::make_unique<> () at ../contrib/libcxx/include/memory:3474
    2  DB::StorageDistributed::requireDirectoryMonitor (this=0x7f9ed34f0000, disk=..., name=...)
       at ../src/Storages/StorageDistributed.cpp:682
    3  0x000000000de3d5fa in DB::DistributedBlockOutputStream::writeToShard (this=this@entry=0x7f9ed39c7418, block=..., dir_names=...)
       at ../src/Storages/Distributed/DistributedBlockOutputStream.cpp:634
    4  0x000000000de3e214 in DB::DistributedBlockOutputStream::writeAsyncImpl (this=this@entry=0x7f9ed39c7418, block=...,
       shard_id=shard_id@entry=79) at ../src/Storages/Distributed/DistributedBlockOutputStream.cpp:539
    5  0x000000000de3e47b in DB::DistributedBlockOutputStream::writeSplitAsync (this=this@entry=0x7f9ed39c7418, block=...)
       at ../contrib/libcxx/include/vector:1546
    6  0x000000000de3eab0 in DB::DistributedBlockOutputStream::writeAsync (block=..., this=0x7f9ed39c7418)
       at ../src/Storages/Distributed/DistributedBlockOutputStream.cpp:141
    7  DB::DistributedBlockOutputStream::write (this=0x7f9ed39c7418, block=...)
       at ../src/Storages/Distributed/DistributedBlockOutputStream.cpp:135
    8  0x000000000d73b376 in DB::PushingToViewsBlockOutputStream::write (this=this@entry=0x7f9ea7a8cf58, block=...)
       at ../src/DataStreams/PushingToViewsBlockOutputStream.cpp:157
    9  0x000000000d7853eb in DB::AddingDefaultBlockOutputStream::write (this=0x7f9ed383d118, block=...)
       at ../contrib/libcxx/include/memory:3826
    10 0x000000000d740790 in DB::SquashingBlockOutputStream::write (this=0x7f9ed383de18, block=...)
       at ../contrib/libcxx/include/memory:3826
    11 0x000000000d68c308 in DB::CountingBlockOutputStream::write (this=0x7f9ea7ac6d60, block=...)
       at ../contrib/libcxx/include/memory:3826
    12 0x000000000ddab449 in DB::StorageBuffer::writeBlockToDestination (this=this@entry=0x7f9fbd56a000, block=..., table=...)
       at ../src/Storages/StorageBuffer.cpp:747
    13 0x000000000ddabfa6 in DB::StorageBuffer::flushBuffer (this=this@entry=0x7f9fbd56a000, buffer=...,
       check_thresholds=check_thresholds@entry=true, locked=locked@entry=false, reset_block_structure=reset_block_structure@entry=false)
       at ../src/Storages/StorageBuffer.cpp:661
    14 0x000000000ddac415 in DB::StorageBuffer::flushAllBuffers (reset_blocks_structure=false, check_thresholds=true, this=0x7f9fbd56a000)
        at ../src/Storages/StorageBuffer.cpp:605

shutdown() on T1275:

    0  DB::StorageDistributed::shutdown (this=0x7f9ed34f0000) at ../contrib/libcxx/include/atomic:1612
    1  0x000000000d6fd938 in DB::InterpreterDropQuery::executeToTable (this=this@entry=0x7f98530c79a0, query=...)
       at ../src/Storages/TableLockHolder.h:12
    2  0x000000000d6ff5ee in DB::InterpreterDropQuery::execute (this=0x7f98530c79a0) at ../src/Interpreters/InterpreterDropQuery.cpp:50
    3  0x000000000daa40c0 in DB::executeQueryImpl (begin=<optimized out>, end=<optimized out>, context=..., internal=<optimized out>,
       stage=DB::QueryProcessingStage::Complete, has_query_tail=false, istr=0x0) at ../src/Interpreters/executeQuery.cpp:420
    4  0x000000000daa59df in DB::executeQuery (query=..., context=..., internal=internal@entry=false, stage=<optimized out>,
       may_have_embedded_data=<optimized out>) at ../contrib/libcxx/include/string:1487
    5  0x000000000e1369e6 in DB::TCPHandler::runImpl (this=this@entry=0x7f9ddf3a9000) at ../src/Server/TCPHandler.cpp:254
    6  0x000000000e1379c9 in DB::TCPHandler::run (this=0x7f9ddf3a9000) at ../src/Server/TCPHandler.cpp:1326
    7  0x000000001086fac7 in Poco::Net::TCPServerConnection::start (this=this@entry=0x7f9ddf3a9000)
       at ../contrib/poco/Net/src/TCPServerConnection.cpp:43
    8  0x000000001086ff2b in Poco::Net::TCPServerDispatcher::run (this=0x7f9e4eba5c00)
       at ../contrib/poco/Net/src/TCPServerDispatcher.cpp:114
    9  0x00000000109dbe8e in Poco::PooledThread::run (this=0x7f9e4a2d2f80) at ../contrib/poco/Foundation/src/ThreadPool.cpp:199
    10 0x00000000109d78f9 in Poco::ThreadImpl::runnableEntry (pThread=<optimized out>)
       at ../contrib/poco/Foundation/include/Poco/SharedPtr.h:401
    11 0x00007f9fc3cccea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
    12 0x00007f9fc3bebeaf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

```

</details>
2020-10-27 21:19:36 +03:00
alesapin
3ec5fc7a4c Add explicit 2020-10-27 18:29:06 +03:00
alesapin
60f2d822d7 Fix fake race condition on system.merges merge_algorithm 2020-10-27 18:27:12 +03:00
Alexander Kuzmenkov
60544ad46e
Merge pull request #16373 from ClickHouse/better-rethrow
Better exceptions rethrow
2020-10-27 16:38:32 +03:00
alesapin
6253d1466a Fix comments 2020-10-27 16:09:14 +03:00
alesapin
3d3d246bdc Rename table 2020-10-27 16:07:50 +03:00
alesapin
e40c509392 More clear callback name 2020-10-27 16:00:40 +03:00
alesapin
f35edfb2a5 Remove some unused fields 2020-10-27 15:57:55 +03:00
alesapin
ee4e6caf70 Remove redundant metric increment 2020-10-27 15:52:49 +03:00
alesapin
3824fcb076 Rename file and some tweaks 2020-10-27 15:47:42 +03:00
alesapin
31d63efdac Fix style 2020-10-27 15:26:10 +03:00
alesapin
dca35b1913 Add awesome test for fetch 2020-10-27 15:24:10 +03:00
kssenii
a48bc83763 Fix style 2020-10-27 12:04:07 +00:00
Pavel Kruglov
331545fe0d Fix typo 2020-10-27 14:29:36 +03:00
Mikhail Filimonov
41971e073a
Fix typos reported by codespell 2020-10-27 12:04:03 +01:00
kssenii
db03cd7dd7 Much more optimal queues setup 2020-10-27 11:00:01 +00:00
kssenii
7beddceadd Fix bug that caused awful CPU usage 2020-10-27 10:02:27 +00:00
kssenii
cd0dbcb9d8 Minimize event loop lifetime 2020-10-27 10:01:39 +00:00
alesapin
d6130f13ef Add table to system tables 2020-10-27 10:21:49 +03:00
alesapin
880f4bbd05 System fetches 2020-10-26 19:38:35 +03:00
Alexander Kuzmenkov
5a70e26c70 Merge remote-tracking branch 'origin/master' into HEAD 2020-10-26 19:21:13 +03:00
alesapin
9ed4668dbb Refactor common part of background list 2020-10-26 15:40:55 +03:00
alesapin
47ebc9f74e Add separate pool for fetches 2020-10-26 14:02:47 +03:00
alesapin
d5d0819698 Merge branch 'master' into no_background_pool_no_more 2020-10-26 12:58:51 +03:00
alexey-milovidov
3aa49204d6
Update MergeTreeSettings.cpp 2020-10-26 07:39:20 +03:00
Alexey Milovidov
d5e277f080 Better exceptions rethrow 2020-10-26 06:35:57 +03:00
Alexey Milovidov
22a89fca01 Fix processing very large entries in queue 2020-10-25 05:57:03 +03:00
Alexey Milovidov
a2d888f19f Fix processing very large entries in queue 2020-10-25 05:57:03 +03:00
Ivan
1d170f5745
ASTTableIdentifier Part #1: improve internal representation of ASTIdentifier name (#16149)
* Use only |name_parts| as primary name source

* Restore legacy logic for table restoration

* Fix build

* Fix tests

* Add pytest server config

* Fix tests

* Fixes due to review
2020-10-24 21:46:10 +03:00
alexey-milovidov
c579611420
Merge pull request #16306 from azat/Set-Join-total-rows-bytes
Add total_rows/total_bytes support for Set/Join
2020-10-24 07:26:32 +03:00
alexey-milovidov
6037982343
Merge pull request #16284 from ClickHouse/primary_key_without_order_by
Add ability to specify PRIMARY KEY without ORDER BY
2020-10-24 06:05:04 +03:00
Alexey Milovidov
13b8dce792 Update contributors 2020-10-24 00:26:22 +03:00
Azat Khuzhin
4d1385ef19 Add total_rows/total_bytes support for Set/Join 2020-10-23 21:11:55 +03:00
alesapin
bc331a8029 Better set 2020-10-23 19:34:41 +03:00
alesapin
b28894c43b More compatible way 2020-10-23 19:31:51 +03:00
alesapin
59ca0d071c Fix comment 2020-10-23 14:17:37 +03:00
alesapin
69f2f9838e Add ability to specify PRIMARY KEY without ORDER BY 2020-10-23 14:16:27 +03:00
alesapin
39e47c5338 Less strange lambdas 2020-10-23 11:54:00 +03:00
Alexander Kuzmenkov
5cbf645de4 Merge remote-tracking branch 'origin/master' into tmp 2020-10-22 19:48:02 +03:00
alesapin
3c559c699f Merge branch 'blind_fix_of_read_in_order' into no_background_pool_no_more 2020-10-22 17:16:46 +03:00
alesapin
1d07ece5d1 Fix clang tidy warning 2020-10-22 17:15:56 +03:00
alesapin
7a63b373f9 Merge branch 'blind_fix_of_read_in_order' into no_background_pool_no_more 2020-10-22 15:47:11 +03:00
alesapin
4b65d5469f Fix some unrelated performance issues in select parts for merge 2020-10-22 15:41:01 +03:00
Nikolai Kochetov
a42fd18390 Try fix tests. 2020-10-22 15:01:22 +03:00
Nikolai Kochetov
7fa045cff8 Merge branch 'master' into storage-read-query-plan 2020-10-22 13:31:10 +03:00
alesapin
945dd3aa59 Merge branch 'master' into blind_fix_of_read_in_order 2020-10-22 10:37:37 +03:00
alexey-milovidov
adeba6bdd8
Merge pull request #15074 from amosbird/btc
Extend trivial count optimization.
2020-10-22 02:50:57 +03:00
Alexander Tokmakov
ac42199ae5 fix race on StorageReplicatedMergeTree::data_parts_exchange_endpoint 2020-10-21 22:25:22 +03:00
Kruglov Pavel
0b75885c8a
Merge branch 'master' into select_final 2020-10-21 20:42:39 +03:00
Pavel Kruglov
89fdeb4e15 Fix style, move setting and add checking level>0 2020-10-21 20:35:31 +03:00
Nikolai Kochetov
a0da588f06 Merge branch 'master' into new-block-for-functions-4 2020-10-21 16:16:58 +03:00
alexey-milovidov
0b7430dda1
Merge pull request #16206 from ClickHouse/fix-memory-tracking
Fix multiple issues with memory tracking
2020-10-21 14:34:22 +03:00
alesapin
c53f59dece
Merge pull request #15984 from ClickHouse/fix_insert_mv_dangling_ref
Fix possibly dangling reference to target table of MV
2020-10-21 12:13:51 +03:00
alesapin
11ea6d7911 Merge branch 'blind_fix_of_read_in_order' into no_background_pool_no_more 2020-10-21 11:39:48 +03:00
alesapin
b45d42bb9c Maybe devirtualization can help 2020-10-21 11:35:36 +03:00
alesapin
9f47c82bbd Sleep a little when pool is full 2020-10-21 11:31:57 +03:00
alesapin
b1a13d4884 Merge branch 'blind_fix_of_read_in_order' into no_background_pool_no_more 2020-10-21 10:30:09 +03:00
Nikolai Kochetov
68c9a57788 Merge branch 'master' into new-block-for-functions-4 2020-10-21 09:17:25 +03:00
Alexey Milovidov
2619efadc8 Fix multiple issues with memory tracking 2020-10-21 03:31:34 +03:00
alexey-milovidov
8084ce75cb
Merge pull request #16105 from azat/allow_nondeterministic_optimize_skip_unused_shards
Add allow_nondeterministic_optimize_skip_unused_shards
2020-10-21 00:16:26 +03:00
alesapin
c77b154398 Better locks in merge tree 2020-10-21 00:10:55 +03:00
alesapin
8097c696de Trying another fix 2020-10-20 23:05:20 +03:00
alexey-milovidov
75a02112bc
Merge pull request #15592 from sundy-li/readonly-metrics
sub ReadonlyReplica metric when detach readonly tables
2020-10-20 19:17:52 +03:00
alesapin
439bbd9861 Blind performance fix 2020-10-20 18:30:46 +03:00
Vladimir Chebotarev
aa5f207fd4
Added disable_merges option for volumes in multi-disk configuration (#13956)
Co-authored-by: Alexander Kazakov <Akazz@users.noreply.github.com>
2020-10-20 18:10:24 +03:00
Nikolai Kochetov
a1d5adf8d5 Merge branch 'master' into new-block-for-functions-4 2020-10-20 16:16:08 +03:00
alesapin
30ca17b09b Comment to settings 2020-10-20 16:12:25 +03:00
alesapin
7256d01579 Normal backoff value instead of 10 seconds 2020-10-20 16:11:01 +03:00
Alexander Kuzmenkov
84908df6d8 fix setting parent from HTTP traceparent 2020-10-20 14:35:13 +03:00
alesapin
ce8ee01d75 Fix background moves start 2020-10-20 14:27:50 +03:00
alesapin
d126aa8a09 Merge branch 'master' into no_background_pool_no_more 2020-10-20 12:54:42 +03:00
alexey-milovidov
5e46e7c670
Merge pull request #15723 from Jokser/idempotent-part-move
Possibility to move part to another disk/volume if first attempt was failed
2020-10-20 04:26:50 +03:00
alexey-milovidov
124379cccc
Update IMergeTreeDataPart.h 2020-10-20 04:24:30 +03:00
alexey-milovidov
26517ff08d
Update IMergeTreeDataPart.h 2020-10-20 04:23:23 +03:00
Nikolai Kochetov
bc58637ec2 Fixing build. 2020-10-19 21:37:44 +03:00
Alexander Kuzmenkov
6dcfd26b29 Merge remote-tracking branch 'origin/master' into tmp 2020-10-19 21:36:30 +03:00
Alexander Kuzmenkov
defcd29b31
Merge pull request #16036 from ClickHouse/stress_test_improvemets
Minor improvements of stress test
2020-10-19 16:12:30 +03:00
Nicolae Vartolomei
af76ff1dbf RFC: Add metadata section to MergeTreeWriteAheadLog
Current WAL format doesn't seem to be extendable without breaking
reverse compatibility.

This PR proposes to introduces a metadata section
for each action in the WAL to which optional fields can be added.

Adding new fields is trivial and doesn't have to break backwards
compatibility if these are not critical for correctness.

Metadata contains the minimum version of the reader allowed
to interpret it.

Removing fields is not supported.
2020-10-19 12:16:31 +01:00
alesapin
514a95c292 Fixup 2020-10-19 12:06:51 +03:00
alesapin
cb139abe2a Better schedule after job already running 2020-10-19 11:47:15 +03:00
alesapin
e09713ece1 Merge branch 'master' into no_background_pool_no_more 2020-10-19 10:58:31 +03:00
alesapin
963bc57835
Merge pull request #16011 from ClickHouse/fix_alter_add_and_modify_order_by
Fix alter sorting key for ReplicatedVersionedCollapsingMergeTree
2020-10-19 10:31:13 +03:00
Azat Khuzhin
9b8abd44ab Add allow_nondeterministic_optimize_skip_unused_shards 2020-10-17 01:07:02 +03:00
Alexander Tokmakov
c19d2efd88 add more holders 2020-10-16 20:16:58 +03:00
alesapin
518ba2ceb2 Safe random generator 2020-10-16 16:48:12 +03:00
Alexander Tokmakov
026896835c fixes 2020-10-16 15:20:30 +03:00
alesapin
c22c760ac1 Fix unit test build 2020-10-16 13:18:56 +03:00
alesapin
7edbe4d276 Add some comments 2020-10-16 13:12:31 +03:00
Pavel Kovalenko
a474bdcabf Merge remote-tracking branch 'origin/master' into idempotent-part-move 2020-10-16 13:02:40 +03:00
alesapin
0fb1f74b2e Trying to schedule better 2020-10-16 11:00:15 +03:00
alesapin
280d0c55c2 Merge branch 'master' into no_background_pool_no_more 2020-10-16 10:25:02 +03:00
Alexey Milovidov
6c3aad34be Avoid stack overflow in materialized views, part 2: sanity check 2020-10-16 03:19:45 +03:00
Alexey Milovidov
ffd3d2519e Avoid stack overflow in materialized views, part 1 2020-10-16 03:13:17 +03:00
Kruglov Pavel
5aba639430 Update test 2020-10-15 22:01:18 +03:00
sundy-li
153be93544 sub ReadonlyReplica when detach readonly tables 2020-10-15 22:01:18 +03:00
alesapin
4c1f5cab13 Sleep less in background task 2020-10-15 19:10:22 +03:00
Pavel Kruglov
ee8a9d2cf1 Don't touch MySQL database if it's unnecessary 2020-10-15 18:57:17 +03:00
Alexander Kuzmenkov
bc7b5f6bb4 Merge remote-tracking branch 'origin/master' into tmp 2020-10-15 17:15:05 +03:00
Vitaly Baranov
5f261cec3c
Merge pull request #15199 from filimonov/non_delimited_protobuf
ProtobufSingle format
2020-10-15 16:58:39 +03:00
alesapin
629506445d Better backoff policy 2020-10-15 16:57:50 +03:00
Pavel Kovalenko
ed61c5681b Use 'moving' directory instead of 'detached' when move part to another disk/volume. 2020-10-15 16:55:13 +03:00
alesapin
60d14352f8 Merge branch 'master' into no_background_pool_no_more 2020-10-15 16:34:14 +03:00
Alexander Kuzmenkov
f366b366ae
Merge pull request #15987 from filimonov/background-pool-count_no_work_done-bug
Fix the bug when NOTHING_TO_DO events wrongly increment count_no_work_done
2020-10-15 16:11:57 +03:00
alesapin
2002289003 Fix bug in alter primary key for replicated versioned collapsing merge tree 2020-10-15 16:02:39 +03:00
Alexander Kuzmenkov
b4378b004f Merge remote-tracking branch 'origin/master' into tmp 2020-10-15 16:01:41 +03:00
Pavel Kruglov
f5fac575f4 don't postprocess single parts 2020-10-15 15:22:41 +03:00
tavplubix
1003de75ed
Update StorageMaterializedView.cpp 2020-10-15 15:06:44 +03:00
alesapin
dccf51b316 Remove redundant logging 2020-10-15 14:08:39 +03:00
tavplubix
6dc2f00347
Update StorageMaterializedView.cpp 2020-10-15 13:57:47 +03:00
alesapin
84b0c22044 fix possible deadlock 2020-10-15 13:54:50 +03:00
alesapin
374949051c Add thread safety 2020-10-15 13:41:36 +03:00
alesapin
e84eda176a Add test and slightly refactored 2020-10-15 13:22:02 +03:00
alesapin
583d7042e9 Get rid of some deadlocks 2020-10-15 11:29:18 +03:00
Nikolai Kochetov
e8038ae84f
Merge pull request #15857 from amosbird/e2
Refactor processors.
2020-10-15 10:45:00 +03:00
alesapin
c5419083e3 Better method name 2020-10-15 10:43:50 +03:00
alesapin
3394c22c03 Fix race and clang-tidy 2020-10-15 10:39:27 +03:00
Mikhail Filimonov
ace2e99cb3
Fix the bug when NOTHING_TO_DO events wrongly increment count_no_work_done 2020-10-14 23:08:47 +02:00
alesapin
3e3505258f No sleep when we have job 2020-10-14 22:33:36 +03:00
alesapin
ae8ed99805 Missed change 2020-10-14 21:35:03 +03:00
alesapin
7265792510 Less files 2020-10-14 21:33:41 +03:00
alesapin
a535a089d1 Some style fixes 2020-10-14 19:09:18 +03:00
alesapin
fc25b6cd72 Remove background processing pool 2020-10-14 18:26:00 +03:00
alesapin
6a4911dc57 Remove some garbage 2020-10-14 18:05:14 +03:00
alesapin
483893cdd4 Slightly refactored code 2020-10-14 17:56:42 +03:00
Vitaly Baranov
997570780d
Merge branch 'master' into non_delimited_protobuf 2020-10-14 16:26:57 +03:00
alesapin
0b14a31ba9 Get rid of background processing pool 2020-10-14 15:44:10 +03:00
alesapin
4014e0f08d Something very similar to working code 2020-10-14 15:32:35 +03:00
Alexander Tokmakov
72b1339656 Revert "Revert "Write structure of table functions to metadata""
This reverts commit c65d1e5c70.
2020-10-14 15:19:29 +03:00
tavplubix
c65d1e5c70
Revert "Write structure of table functions to metadata" 2020-10-14 13:59:29 +03:00
alesapin
efd3126b5d Moving pool 2020-10-14 10:22:48 +03:00
alexey-milovidov
f60ccb4edf
Merge pull request #14295 from ClickHouse/write_structure_of_table_functions
Write structure of table functions to metadata
2020-10-13 23:56:09 +03:00
Pavel Kruglov
44c2b138f3 Fix style 2020-10-13 22:53:36 +03:00
Pavel Kruglov
be0cb31d21 Add tests and comments 2020-10-13 21:55:03 +03:00
Pavel Kruglov
8200bab859 Add setting do_not_merge_across_partitions 2020-10-13 17:54:52 +03:00
alesapin
fd35368c59 First simple implementation 2020-10-13 17:25:42 +03:00
alesapin
dcf489ac8f Remove unused methods
(cherry picked from commit 77f5841a46)
2020-10-13 15:10:59 +03:00
alesapin
ef355e71d6 Buildable code 2020-10-13 15:10:46 +03:00
alesapin
48aaa0ce16 Split merge to separate method
(cherry picked from commit 14a7a25c4b)
2020-10-13 15:06:32 +03:00
alesapin
cb7db6d232 Split select and process merges
(cherry picked from commit 1889eb0ff1)
2020-10-13 15:04:16 +03:00
Nikita Mikhaylov
835c480056
Merge pull request #15858 from ClickHouse/fix_alter_default_validation
Fix alter default validation
2020-10-13 12:47:18 +03:00
tavplubix
6c1d59cd49
Merge pull request #15743 from azat/Atomic-DROP-TABLE-hang-fix
Fix DROP TABLE hangs with Atomic engine
2020-10-13 12:40:36 +03:00
alesapin
321a7ae6bf
Merge pull request #15852 from ClickHouse/fix_reverse_processor
Fix block structure mismatch after ALTER
2020-10-13 09:49:26 +03:00
Amos Bird
ca7a5ccd0d
More resize 2020-10-13 09:56:35 +08:00
Azat Khuzhin
bba44d0f0e Add IF EXISTS for removing inner table of the materialized view
Instead of playing with has_inner_table flag, which looks a bit icky.
2020-10-12 21:46:07 +03:00
Azat Khuzhin
d16adddb41 Fix drop of materialized view with inner table in Atomic database
Materialized view drop the inner table (if any) drop the drop() method,
and this will lead to essure recursive drop() from the drop worker
thread, which will hang:

    3  std::__1::condition_variable::wait<> ()
    4  DB::DatabaseCatalog::waitTableFinallyDropped (this=0x7ffff7831500, uuid=...) at ../src/Interpreters/DatabaseCatalog.cpp:828
    5  DB::InterpreterDropQuery::executeToTable (this=this@entry=0x7fff16ff88a0, table_id_=..., query=...) at ../src/Interpreters/InterpreterDropQuery.cpp:135
    6  DB::InterpreterDropQuery::execute (this=this@entry=0x7fff16ff88a0) at ../contrib/libcxx/include/string:1474
    7  DB::executeDropQuery (kind=kind@entry=DB::ASTDropQuery::Drop, global_context=..., target_table_id=...) at ../src/Storages/StorageMaterializedView.cpp:156
    8  DB::StorageMaterializedView::drop (this=0x7ffefc348f40) at ../src/Storages/StorageMaterializedView.cpp:169
    9  DB::DatabaseCatalog::dropTableFinally (this=this@entry=0x7ffff7831500, table=...) at ../src/Interpreters/DatabaseCatalog.cpp:775
    10 DB::DatabaseCatalog::dropTableDataTask (this=0x7ffff7831500) at ../src/Interpreters/DatabaseCatalog.cpp:745

Fix this by dropping the inner table just before scheduling job the the
drop worker thread.
2020-10-12 21:46:07 +03:00
Alexander Kuzmenkov
6200433e12 Merge origin/master into tmp (using imerge) 2020-10-12 21:15:31 +03:00
Mikhail Filimonov
87a8ba63f7
Few more CR fixes 2020-10-12 15:05:40 +02:00
tavplubix
748b75ab1b
Merge pull request #15767 from ClickHouse/fix_materialize_mysql_count_v2
Try fix select count() for MaterializeMySQL (another way)
2020-10-12 14:41:38 +03:00
Nikolai Kochetov
2a62a91af4
Merge pull request #15662 from ClickHouse/fix-15529
Fix read from Buffer table with empty nested table with different types.
2020-10-12 14:12:11 +03:00
alesapin
6732e5c217 Fix alter default validation 2020-10-12 14:02:35 +03:00
Nikolai Kochetov
7e58f99f64 Merge branch 'master' into storage-read-query-plan 2020-10-12 13:12:39 +03:00
Amos Bird
47fcd8bffb
Fix some problems introduced by refactoring. 2020-10-12 17:58:09 +08:00
Amos Bird
d2dcfc3f0d
Refactor processors. 2020-10-12 17:30:05 +08:00
alesapin
5b5dd4fb28 Fix order by desc after alter 2020-10-12 11:28:47 +03:00
Mikhail Filimonov
f6b00f2cb6
After CR fixes 2020-10-12 07:52:09 +02:00
Mikhail Filimonov
6df42c580b
ProtobufSingle output format 2020-10-12 07:51:45 +02:00
alexey-milovidov
10e9d14466
Merge pull request #15818 from ClickHouse/style-pragma-once
Check for #pragma once in headers
2020-10-11 13:14:09 +03:00
alexey-milovidov
1187903b44
Merge pull request #15813 from ClickHouse/remove-useless-metrics
Remove useless metrics to avoid confusion
2020-10-11 01:11:17 +03:00
Alexey Milovidov
269b6383f5 Check for #pragma once in headers 2020-10-10 21:37:02 +03:00
Alexey Milovidov
5b482f4191 Cleanups 2020-10-10 19:31:10 +03:00
Alexey Milovidov
06fcf437fe Addition to prev. revision 2020-10-10 19:02:13 +03:00
Alexey Milovidov
9f15daf45c Remove useless metrics to avoid confusion 2020-10-10 18:52:44 +03:00
robot-clickhouse
554fa482e6 Auto version update to [20.11.1.1] [54442] 2020-10-10 18:39:58 +03:00
Nikolai Kochetov
76a04fb4b4
Merge pull request #15762 from ClickHouse/new-block-for-functions
Use `ColumnsWithTypeAndName` instead of `Block` for function calls
2020-10-10 08:50:38 +03:00
Nikita Mikhaylov
6ac5431804
Merge pull request #15783 from nikitamikhaylov/copier-backquotes
Merging  #14939
2020-10-10 02:32:27 +03:00
alexey-milovidov
0fd007ad9e
Merge pull request #15601 from alexelex/alexelex-master
Improvement of Quorum Inserts in ClickHouse
2020-10-09 22:43:53 +03:00
alesapin
35165c8ea4
Merge pull request #15756 from CurtizJ/fix-prewhere-with-virtuals
Fix prewhere with virtual columns
2020-10-09 18:07:41 +03:00
nikitamikhaylov
88a5302759 Merge branch 'master' of github.com:ClickHouse/ClickHouse into copier-backquotes 2020-10-09 16:26:31 +03:00
Alexandra Latysheva
f6f33168aa fix compilation error 2020-10-09 12:11:21 +00:00
Alexandra Latysheva
0594a77b57 fix thread restart for parallel quorum inserts 2020-10-09 11:20:20 +00:00
Nikolai Kochetov
a7fb2e38a5 Use ColumnWithTypeAndName as function argument instead of Block. 2020-10-09 10:41:28 +03:00
Alexander Tokmakov
a6178cc876 try fix select count() for MaterializeMySQL 2020-10-08 23:39:24 +03:00
tavplubix
7b5f2b2bb0
Merge pull request #15701 from ClickHouse/better_clone_replica
Improvements in lost replica recovery
2020-10-08 23:19:23 +03:00
Alexandra Latysheva
6877f4aa9c for parallel and non-parallel quorum insertion at the same time 2020-10-08 15:35:41 +00:00
tavplubix
6065a5b65c
Update StorageReplicatedMergeTree.cpp 2020-10-08 16:37:32 +03:00
Anton Popov
1a6d2bc538 fix prewhere with virtuals columns 2020-10-08 15:59:47 +03:00
Pervakov Grigorii
3a2068f19d Use tmp disk for vertical merge files 2020-10-08 13:49:41 +03:00
alexey-milovidov
c0cb18b445
Merge pull request #15740 from azat/kafka-memory-accounting
Take memory allocations from librdkafka threads into account
2020-10-08 13:12:54 +03:00
Amos Bird
867216103f
Extend trivial count optimization. 2020-10-08 18:08:17 +08:00
Azat Khuzhin
1f51de362f Take memory allocations from librdkafka threads into account 2020-10-07 23:18:20 +03:00
alexey-milovidov
e465ce3d49
Merge pull request #15642 from azat/force_data_skipping_indices
Implement force_data_skipping_indices setting
2020-10-07 23:14:51 +03:00
Alexander Tokmakov
ffb19fa4bc fix 2020-10-07 22:47:31 +03:00
Azat Khuzhin
3cd71f3357 Cleanup interceptors for librdkafka in StorageKafka
Wrap them into StorageKafkaInterceptors to allow access to private
fields and add logging inside interceptors if something fails.

This is also preparation for ThreadStatus interceptor.
2020-10-07 21:42:13 +03:00
Nikolai Kochetov
54e77e906e
Merge pull request #15717 from ClickHouse/fix-array-join-optimisation-for-mv
Fix array join optimisation for MV
2020-10-07 20:19:35 +03:00
Latysheva Alexandra
f43ad338ed
Merge pull request #12 from alexelex/quorum_inserts_2
style check
2020-10-07 18:56:14 +06:00
Alexandra Latysheva
8f8872dc42 style check 2020-10-07 12:24:46 +00:00
Latysheva Alexandra
6c26f77380
Merge pull request #11 from alexelex/quorum_inserts_2
changing the condition for updateQuorum, specialized it and reduced t…
2020-10-07 17:49:20 +06:00
Pavel Kovalenko
69c126f1f1 Possibility to move part to another disk/volume if first attempt was failed. 2020-10-07 14:35:28 +03:00
Alexandra Latysheva
a43cac2c1a changing the condition for updateQuorum, specialized it and reduced the number of calls to the zk 2020-10-07 11:28:48 +00:00
Nikolai Kochetov
7e02152b50 Merge branch 'master' into storage-read-query-plan 2020-10-07 14:27:21 +03:00
Nikolai Kochetov
c5cb05f5f3 Try fix tests. 2020-10-07 14:26:29 +03:00
tavplubix
041015545c
Merge pull request #15537 from ClickHouse/mutation_hangs_after_replace_partition
Fix mutation may hang after REPLACE/DROP PARTITION
2020-10-07 14:25:29 +03:00
Nikolai Kochetov
df02573c92 Fix ARRAY JOIN optimisation when reading from MV. 2020-10-07 13:11:58 +03:00
Nikolai Kochetov
5f7aeddfe5
Merge pull request #15682 from ClickHouse/akz/storage_memory_less_locks
Less locking in StorageMemory: totalRows + totalBytes
2020-10-07 12:59:20 +03:00
alexey-milovidov
e00961f882
Merge pull request #15657 from Jokser/disk-s3-write-error-handling
Proper error handling during insert into MergeTree with S3
2020-10-07 11:17:32 +03:00
Alexander Tokmakov
47e9fe9ff1 fix 2020-10-07 03:05:48 +03:00