00956_sensitive_data_masking is still flacky even after #13748 [1].
[1]: https://clickhouse-test-reports.s3.yandex.net/10373/348ef1256ea8fb8f61109c33bbdd28daf46bdc8e/functional_stateless_tests_(debug).html#fail1
The problem is that it uses the following pattern:
clickhouse-client -q ... & # run some query in background
clickhouse-client -q 'show processlist' > log
grep background-query log
But there is no guarantee that the query in background will be executed before `show processlist`:
2020.08.18 02:52:47.916386 [ 26788 ] {98c36d38-f710-4dfb-af8f-61906abc163c} <Debug> executeQuery: (from [::1]:51650) SHOW PROCESSLIST
...
2020.08.18 02:52:47.926854 [ 26756 ] {086c64fa-713b-4f8c-b702-23bfea10a49c} <Debug> executeQuery: (from [::1]:51652) select count() from system.numbers where ignore('find_me_[hidden]')=0 and ignore('fwerkh_that_magic_string_make_me_unique') = 0 FORMAT Null
Fix the test by waiting until the query in backgroud will start, and use
limited numbers + sleepEachRow over system.numbers to reduce CPU usage.
With default index_granularity=8096 CH always reads at least that number
of rows per selected part, but limit is checked afterwards. The optimization
that interrupts execution of queries based on approx number of rows to read
breaks the test. This means that test case is potetntially contains incorrect
limits.
Even when finish() is called, there can be no EndOfStream sent, so it is
100% correct to handle Log packages there.
W/o fix in RemoteQueryExecutor:
Code: 100, e.displayText() = DB::Exception: Unknown packet 10 from one of the following replicas: : While executing Remote (version 20.8.1.1) (from [::1]:56960) (in query: select * from remote('127.{2,3}', system.numbers) where number = 10 limit 1; ), Stack trace (when copying this message, always include the lines below):
0. Common/StackTrace.cpp:291: StackTrace::tryCapture() @ 0x28b80a
1. Common/StackTrace.cpp:256: StackTrace::StackTrace() @ 0x28b6ab
2. Common/Exception.cpp:42: DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) @ 0x2481ba
3. Common/Exception.h:28: DB::Exception::Exception<>() @ 0x334d48
4. DataStreams/RemoteQueryExecutor.cpp:288: DB::RemoteQueryExecutor::finish() @ 0x330314
5. Processors/Sources/RemoteSource.cpp:46: DB::RemoteSource::generate() @ 0x6fce5