Commit Graph

3472 Commits

Author SHA1 Message Date
avogar
74f09d6476 Fix tests 2021-12-29 12:18:56 +03:00
avogar
aaf9f85c67 Add more tests and fixes 2021-12-29 12:18:56 +03:00
kssenii
c8dcde7843 Fix 2021-12-28 23:57:36 +03:00
alesapin
90db762c87
Merge pull request #33215 from ClickHouse/fix_flaky_integration_tests
Fix some flaky integration tests
2021-12-28 11:27:46 +03:00
alesapin
875eb54754
Update test.py 2021-12-28 11:21:33 +03:00
Vladimir C
bb6fc853e3
Merge pull request #31442 from vdimir/cluster-discovery 2021-12-28 10:53:30 +03:00
Kseniia Sumarokova
0178fb5e0b
Merge pull request #33214 from kssenii/external-database-fix-where-false
Fix WHERE 1=0 for external databases query
2021-12-27 18:53:52 +03:00
vdimir
d3b1058c40
cluster discovery configuration, support shards 2021-12-27 15:26:11 +03:00
vdimir
fbdb5c60bd
initial initialization of cluster discovery in main thread 2021-12-27 15:26:10 +03:00
vdimir
57cbbd9fcf
global option allow_experimental_cluster_discovery 2021-12-27 15:26:09 +03:00
vdimir
96a0371eca
add option allow_experimental_cluster_discovery 2021-12-27 15:26:09 +03:00
vdimir
ceec643f90
update config structure: remote_servers_discovery -> remote_servers.discovery 2021-12-27 15:26:09 +03:00
vdimir
1f460f05fe
add retry for first check in test_cluster_discovery_startup_and_stop 2021-12-27 15:26:07 +03:00
vdimir
43bfcacd61
Add test_cluster_discovery 2021-12-27 15:26:06 +03:00
Vitaly Baranov
f80a3e3247
Merge pull request #30549 from aiven/kmichel-server-reload
Start/stop servers when `listen_host`/`*_port` changes
2021-12-27 14:51:00 +03:00
alesapin
48f0cee798 Merge branch 'master' into fix_flaky_integration_tests 2021-12-27 14:38:26 +03:00
alesapin
4eb8c11bb0
Merge pull request #33163 from azat/fix-test_input_format_parallel_parsing_memory_tracking
Make test_input_format_parallel_parsing_memory_tracking less flaky
2021-12-27 14:36:32 +03:00
alesapin
593dc6cf90 Fix some flaky integration tests 2021-12-27 12:24:19 +03:00
kssenii
a1aab3a82d Fix 2021-12-27 11:59:33 +03:00
Vladimir C
ea5f867289
Merge pull request #33179 from kssenii/materialized-postgresql-fix-detach-with-schema 2021-12-27 11:42:59 +03:00
Vladimir C
211a5a8d6b
Merge pull request #33159 from xuyatian/master 2021-12-27 11:40:59 +03:00
kssenii
568aeec0b3 Review fix 2021-12-27 09:51:29 +03:00
Yatian Xu
8dc07dff4a add Clarification for test case 2021-12-26 11:24:47 -08:00
Azat Khuzhin
906ebc9fd4 test_input_format_parallel_parsing_memory_tracking: increase max_server_memory_usage
Even after disabling all system tables TSan build still not passed,
since it uses 2.8Gi of RAM just after start, so let's increase this
memory limit a little.
2021-12-26 16:50:35 +03:00
Azat Khuzhin
3f752c3acb Make test_input_format_parallel_parsing_memory_tracking less flaky
By disabling system tables, that may consume memory too.

Also note, that failures with "curl: (56) Recv failure: Connection reset
by peer" like [1] is due to memory, since the server was under memory
pressure, and was not able even to accept the connection:

<details>

    2021.12.25 00:22:02.957658 [ 54 ] {} <Error> ThreadStatus: Code: 241. DB::Exception: Memory limit (total) exceeded: would use 2.81 GiB (attempt to allocate chunk of 2097182 bytes), maximum: 2.79 GiB. (MEMORY_LIMIT_EXCEEDED), 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) @ 0x1addca1b in /usr/bin/clickhouse
    1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa0e993c in /usr/bin/clickhouse
    2. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: DB::Exception::Exception<char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*&&, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, long&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) @ 0xa11344b in /usr/bin/clickhouse
    3. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:226: MemoryTracker::allocImpl(long, bool) @ 0xa11220c in /usr/bin/clickhouse
    4. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:258: MemoryTracker::allocImpl(long, bool) @ 0xa111faa in /usr/bin/clickhouse
    5. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:264: MemoryTracker::alloc(long) @ 0xa112bc6 in /usr/bin/clickhouse
    6. ./obj-x86_64-linux-gnu/../src/Common/ThreadStatus.cpp:152: DB::ThreadStatus::~ThreadStatus() @ 0xa10e182 in /usr/bin/clickhouse
    7. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:518: DB::TCPHandler::runImpl() @ 0x17c4192d in /usr/bin/clickhouse
    8. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1909: DB::TCPHandler::run() @ 0x17c55328 in /usr/bin/clickhouse
    9. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x1ac19f03 in /usr/bin/clickhouse
    10. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:1397: Poco::Net::TCPServerDispatcher::run() @ 0x1ac1a773 in /usr/bin/clickhouse
    11. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x1ae7e796 in /usr/bin/clickhouse
    12. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x1ae7c930 in /usr/bin/clickhouse
    13. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/include/Poco/SharedPtr.h:277: Poco::ThreadImpl::runnableEntry(void*) @ 0x1ae7afa8 in /usr/bin/clickhouse
    14. __tsan_thread_start_func @ 0xa039dfd in /usr/bin/clickhouse
    15. ? @ 0x7f4c565cf609 in ?
    16. clone @ 0x7f4c564f6293 in ?
     (version 21.13.1.1305)

</details>

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/33140/b4420cfa3e834ab9026914978697ded3180122a0/integration_tests__thread__actions__[3/4].html
2021-12-26 16:50:34 +03:00
kssenii
e663cb4574 Fix detaching-attaching table with schema 2021-12-25 19:51:55 +03:00
alexey-milovidov
f9d961d46d
Merge pull request #33164 from azat/fix-test_async_drain_connection
Fix test_async_drain_connection flakiness
2021-12-25 16:23:17 +03:00
Kruglov Pavel
22dbaec11a
Merge pull request #33142 from Avogar/fix-s3-write
Don't allow to write into S3 if path contains globs
2021-12-25 16:07:38 +03:00
Azat Khuzhin
42ab02a810 Fix test_async_drain_connection flakiness
Sometimes [1] 5 seconds is not enough, since drain_timeout is 3 seconds,
and 2 seconds sometimes is not enough to do other things, especially
under sanitizers:

    E           Code: 159. DB::Exception: Received from 172.16.1.2:9000. DB::Exception: Timeout exceeded: elapsed 5.019254094 seconds, maximum: 5. Stack trace:

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/0/826f7cb0f53e20e67ef52800cb735bb88a6de658/integration_tests__thread__actions__[4/4].html
2021-12-25 11:55:57 +03:00
Azat Khuzhin
da211909e9 tests/integration: refactor test_async_drain_connection 2021-12-25 11:55:57 +03:00
Yatian Xu
3fa78c5642 test case for metrics: StorageBufferBytes 2021-12-25 00:43:45 -08:00
Yatian Xu
2e151a278d correct table name 2021-12-25 00:03:23 -08:00
Yatian Xu
02362a35b4 add test case for metrics: StorageBufferBytes 2021-12-25 00:02:02 -08:00
avogar
58966e90e9 Don't allow to write into S3 if path contains globs 2021-12-24 17:13:35 +03:00
Nikita Mikhaylov
29fdc422d0
Merge pull request #32974 from nikitamikhaylov/hdfsCluster
Merging #32400
2021-12-24 16:02:54 +03:00
Kevin Michel
ffc1fca296
Start/stop servers when listen_host/*_port changes
This allows starting and stopping separately each protocol server
without restarting ClickHouse.

This also allows adding or removing `listen_host` entries, which
start and stops servers for all enabled ports.

When stopping a server, the listening socket is immediately closed
(and available for another server).

Protocols with persistent connections try to wait for any currently
running query to finish before closing the connection, but idle
connection are closed quickly (depending on how often the protocol
is polled).

An extra ProfileEvent is added, `MainConfigLoads`, it is
incremented every time the configuration is reloaded. This helps
when trying to assess whether the new configuration was applied.
2021-12-24 08:26:02 +01:00
Kseniia Sumarokova
f0434f21ce
Merge pull request #33039 from kssenii/fix-azure-exception
Fix exception in azure write buffer desctructor
2021-12-23 10:26:40 +03:00
alexey-milovidov
26e651eaf4
Merge pull request #32916 from azat/jemalloc-percpu-fix
Disable percpu arena in jemalloc in case of non deterministic CPU count
2021-12-23 08:05:43 +03:00
kssenii
182a065c9b Add test 2021-12-22 23:47:16 +03:00
Kseniia Sumarokova
764bb1181f
Merge pull request #33017 from stigsb/table-overrides-drop-add-column-support
Remove the possibility of adding columns with table overrides
2021-12-22 22:30:21 +03:00
Azat Khuzhin
b2d4520870 tests/integration/test_jemalloc_percpu_arena: cover explicit narenas 2021-12-22 21:06:21 +03:00
Azat Khuzhin
c82701b1ef tests/integration/test_jemalloc_percpu_arena: add support of fast-test binary 2021-12-22 21:05:11 +03:00
Azat Khuzhin
6efa3b3667 Add a test for jemalloc percpu arena with different number of online CPUs 2021-12-22 21:05:11 +03:00
Kseniia Sumarokova
01f2e4c00d
Merge pull request #33037 from kssenii/fix-s3-empty-file
Fix s3 table function reading empty file
2021-12-22 18:17:29 +03:00
tavplubix
85d49bf557
Merge pull request #33044 from ClickHouse/tavplubix-patch-5
Decrease default timeout for integration test
2021-12-22 17:26:23 +03:00
tavplubix
d8fb293d57
Merge pull request #32900 from zzsmdfj/issue/#15182_MaterializeMySQL_support_bit_type
Add support for BIT data type in MaterializedMySQL
2021-12-22 15:58:29 +03:00
tavplubix
8775afc25e
Update pytest.ini 2021-12-22 14:53:40 +03:00
kssenii
11731cde92 Fix test 2021-12-22 13:57:08 +03:00
tavplubix
4ba76dd8e3
Update materialize_with_ddl.py 2021-12-22 12:19:51 +03:00
kssenii
d8ed4db6d4 Fix 2021-12-22 11:42:23 +03:00