Commit Graph

10704 Commits

Author SHA1 Message Date
alesapin
91bc4478d7 Merge branch 'master' into persistent_nukeeper_snapshot_storage 2021-03-01 13:18:35 +03:00
alesapin
11f2a271a2 Remove useless unit test 2021-03-01 10:40:00 +03:00
alexey-milovidov
174f49a9f1
Merge pull request #21308 from fuwhu/refine-wal-restore-code
remove unused code in MergeTreeWriteAheadLog::restore
2021-03-01 01:44:23 +03:00
alexey-milovidov
81be2d1ed9
Merge pull request #21305 from azat/terminate-nested-writers
Fix abnormal server termination for nested writers
2021-02-28 21:54:13 +03:00
alexey-milovidov
b924b28c57
Merge pull request #21306 from azat/unused-writers
[RFC] Remove unused writers
2021-02-28 21:47:01 +03:00
fuwhu
2df33be7c2 Remove unused code in MergeTreeWriteAheadLog::restore 2021-02-28 23:17:31 +08:00
Azat Khuzhin
eb0387c5a9 Fix abnormal server termination for nested writers
Writers with nested writer can call next() from the dtor for nested
writer and this will cause exception again, so the buffer position
should be updated on exceptions.

Found by stress test (thread) here [1] and here [2]:

    2021.02.27 19:27:53.498977 [ 302 ] {} <Fatal> BaseDaemon: (version 21.3.1.6130, build id: 2DAEC5DEBF03C5A1C3BF66B7779C886F16239345) (from thread 1614) Terminate called for uncaught exception:
    Code: 24, e.displayText() = DB::Exception: Cannot write to ostream at offset 2097498, Stack trace (when copying this message, always include the lines below):

    0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:0: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x15bef2ab in /usr/bin/clickhouse
    1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:56: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8aea92e in /usr/bin/clickhouse
    2. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromOStream.cpp:0: DB::WriteBufferFromOStream::nextImpl() @ 0x8bbbc45 in /usr/bin/clickhouse
    3. ./obj-x86_64-linux-gnu/../src/IO/BufferBase.h:39: DB::WriteBufferFromOStream::~WriteBufferFromOStream() @ 0x8bbc077 in /usr/bin/clickhouse
    4. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromOStream.cpp:44: DB::WriteBufferFromOStream::~WriteBufferFromOStream() @ 0x8bbc18a in /usr/bin/clickhouse
    5. ./obj-x86_64-linux-gnu/../src/IO/BufferWithOwnMemory.h:137: DB::ZstdDeflatingWriteBuffer::~ZstdDeflatingWriteBuffer() @ 0x118bdc29 in /usr/bin/clickhouse
    6. ./obj-x86_64-linux-gnu/../src/IO/ZstdDeflatingWriteBuffer.cpp:32: DB::ZstdDeflatingWriteBuffer::~ZstdDeflatingWriteBuffer() @ 0x118be3ea in /usr/bin/clickhouse
    7. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:0: DB::WriteBufferFromHTTPServerResponse::finalize() @ 0x12f1dceb in /usr/bin/clickhouse
    8. ./obj-x86_64-linux-gnu/../src/Server/HTTPHandler.cpp:703: DB::HTTPHandler::trySendExceptionToClient(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, DB::HTTPServerRequest&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&) @ 0x12e9fecc in /usr/bin/clickhouse
    9. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x12ea0d60 in /usr/bin/clickhouse
    10. ./obj-x86_64-linux-gnu/../src/Server/HTTP/HTTPServerConnection.cpp:0: DB::HTTPServerConnection::run() @ 0x12f16db1 in /usr/bin/clickhouse
    11. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x15b184f3 in /usr/bin/clickhouse
    12. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:0: Poco::Net::TCPServerDispatcher::run() @ 0x15b18c1f in /usr/bin/clickhouse
    13. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/include/Poco/ScopedLock.h:36: Poco::PooledThread::run() @ 0x15c7fdb2 in /usr/bin/clickhouse
    14. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x15c7e350 in /usr/bin/clickhouse
    15. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/include/Poco/SharedPtr.h:277: Poco::ThreadImpl::runnableEntry(void*) @ 0x15c7cb58 in /usr/bin/clickhouse
    16. __tsan_thread_start_func @ 0x8a04ced in /usr/bin/clickhouse
    17. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
    18. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
     (version 21.3.1.6130)

  [1]: https://clickhouse-test-reports.s3.yandex.net/21279/4f61ef3099f42f17b496a0b0424773978d9a32dc/stress_test_(thread).html#fail1
  [2]: https://clickhouse-test-reports.s3.yandex.net/21292/ae9fea1d0af118a8f87b224d194d61da1567188b/stress_test_(thread).html#fail1

v2: https://clickhouse-test-reports.s3.yandex.net/21305/e969daa6e86c5e09cfef08cfde19712982b64e59/stress_test_(thread).html#fail1
2021-02-28 15:13:42 +03:00
Azat Khuzhin
568a49dad5 Remove unused AsynchronousWriteBuffer 2021-02-28 11:19:56 +03:00
Azat Khuzhin
8b58dba094 Drop unused HexWriteBuffer 2021-02-28 10:52:09 +03:00
Alexey Milovidov
ae9fea1d0a Fix gcc and clang-tidy 2021-02-28 04:05:04 +03:00
Alexey Milovidov
107d8ec811 Merge branch 'master' into extract-text-from-html 2021-02-28 04:03:32 +03:00
Alexey Milovidov
e5ae9cbb63 Fix Arcadia 2021-02-28 04:03:22 +03:00
alexey-milovidov
b8fba768e5
Merge pull request #21264 from ClickHouse/fix_zookeeper_update
Fix several bugs with ZooKeeper client
2021-02-28 01:57:04 +03:00
Alexey Milovidov
4ab18cdcd8 Tests and documentation 2021-02-28 00:59:27 +03:00
Alexey Milovidov
2ac673b12a Update logic and tests 2021-02-27 22:33:55 +03:00
Alexey Milovidov
fd1cf49e92 Rewrite extractTextFromHTML function 2021-02-27 22:22:38 +03:00
Maksim Kita
315824978d CheckConstraintsBlockOutputStream optimize nullable column case 2021-02-27 19:19:21 +03:00
alexey-milovidov
56af09891b
Merge pull request #20991 from kssenii/brotli
Fix Brotli http compression issue
2021-02-27 16:39:49 +03:00
alesapin
9dc3952ff3 Fix typo 2021-02-27 16:30:43 +03:00
Maksim Kita
9996f68160
Merge pull request #20990 from kitaisreal/constraints-complex-type-support
Constraints complex types support
2021-02-27 13:16:29 +03:00
Vladimir
df728dc4ba
Merge pull request #21248 from vdimir/fix-join-totals-nullable
Convert columns to nullable for totals in join
2021-02-27 11:31:02 +03:00
Alexander Kazakov
63b95c7451
MySQL dictionary source: A mechanism for retrying unexpected connection loss during communication with mysql server (#21237)
* Added a new type of Exception

for better recognition of connection failures

* Added more logging for mysql communication

* Retries on connection loss during query.

Make MySQL dictionary source resilient to unexpected loss of connection
during querying MySQL. This behavior is controlled with
".fail_on_connection_loss" config parameter, which defaults to false.

* Stripped some debugging leftover garbage

* Minor followup corrections

* Corrections after PR comments

* Yet more fixes
2021-02-27 11:18:28 +03:00
alesapin
9e93d7f507 Fix tidy and add comments 2021-02-27 11:07:14 +03:00
alesapin
184e9b9424
Merge pull request #21207 from ClickHouse/better_nukeeper_for_tests
Trying to make nukeeper better in single server mode
2021-02-26 23:59:41 +03:00
alesapin
a48bb7e3a0 Fix redundant zookeeper reconnect and possibility of multiple zookeeper session for a single ClickHouse server 2021-02-26 22:05:25 +03:00
alesapin
83e2f1ca64 More fixes 2021-02-26 17:54:59 +03:00
kssenii
991718d459 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into brotli 2021-02-26 14:31:24 +00:00
tavplubix
09f62447af
Merge pull request #21060 from mxzlxy/fix-bug-for-replicated-engine-parameter
fix default_replica_path and default_replica_name values are useless …
2021-02-26 17:18:56 +03:00
alesapin
12f74d4e4a Fix build 2021-02-26 16:56:57 +03:00
alesapin
8130726794 Move storage to new map 2021-02-26 16:53:34 +03:00
vdimir
932286df1f
Convert columns to nullable for totals in join 2021-02-26 16:32:34 +03:00
Vladimir
78024ae2d6
Merge pull request #21009 from vdimir/fix-race-storage-join 2021-02-26 14:26:10 +03:00
Maksim Kita
749dd8d555
Merge pull request #21193 from kitaisreal/storage-rabbit-mq-added-uvloop
StorageRabbitMQ added UVLoop
2021-02-26 11:04:02 +03:00
alesapin
56d9d99d1c Fix style and bayan 2021-02-26 09:59:40 +03:00
alesapin
5b72cd231f
Merge pull request #21183 from ClickHouse/fix_mutation_for_storages
Restrict mutations for engines which doesn't support them
2021-02-26 09:54:09 +03:00
alesapin
84102a22e7 Trying to make testkeeper better in single server mode 2021-02-25 23:30:55 +03:00
alesapin
15face72c5 Stl containers 2021-02-25 22:52:22 +03:00
kssenii
1247c0f36c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into rabbit-fix 2021-02-25 16:49:29 +00:00
alexey-milovidov
6a5ab40988
Merge pull request #21119 from fastio/bugfix_drop_metadata_from_auxiliary
fix the metadata leak when the Replicated*MergeTree with custom ZooKeeper cluster is dropped
2021-02-25 19:24:58 +03:00
vdimir
9c1ba71416
Merge remote-tracking branch 'upstream/master' into fix-race-storage-join 2021-02-25 19:13:49 +03:00
alexey-milovidov
0067a3beac
Merge pull request #19801 from ucasFL/ms
continue of #19487
2021-02-25 19:12:47 +03:00
Maksim Kita
63173eebdb
Merge pull request #21088 from azat/__has_feature-gcc-fix
Fix __has_feature macros under gcc
2021-02-25 18:34:14 +03:00
alesapin
653d962cdd Fix style and add low-level check 2021-02-25 17:43:58 +03:00
Maksim Kita
29e783999c Fixed typo 2021-02-25 17:43:32 +03:00
alesapin
356e548267 Experimenting 2021-02-25 17:23:12 +03:00
alesapin
cf42824756 Experimenting 2021-02-25 17:22:51 +03:00
Maksim Kita
f077a25a7a StorageRabbitMQ added UVLoop 2021-02-25 17:02:34 +03:00
Maksim Kita
da321c2bfe Fixed check for null value in null map 2021-02-25 16:08:04 +03:00
Maksim Kita
23af53067d Updated support for Nullable column 2021-02-25 14:27:46 +03:00
Maksim Kita
2eec1d021b Fixed unused code 2021-02-25 14:27:46 +03:00