Commit Graph

36482 Commits

Author SHA1 Message Date
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Alexey Milovidov
62a8de34cc
Merge pull request #44811 from azat/build/glibc2.36-fix
Fix ASan builds for glibc 2.36+
2023-01-23 23:57:20 +03:00
Kruglov Pavel
478a552a0a
Merge branch 'master' into tsv-csv-detect-header 2023-01-23 21:47:17 +01:00
HarryLeeIBM
61f55ebb8a Fix endian issue in transform function for s390x 2023-01-23 11:54:35 -08:00
Robert Schulze
7adec3d8a4
Update src/Storages/MergeTree/MergeTreeIndexInverted.cpp
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-01-23 20:53:25 +01:00
Robert Schulze
d8af5bc2ef
Update src/Storages/MergeTree/MergeTreeIndexInverted.cpp
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-01-23 20:53:17 +01:00
Robert Schulze
f2f520485f
Update src/Interpreters/GinFilter.h
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-01-23 20:49:25 +01:00
Robert Schulze
0ab7ae6c17
Merge pull request #43797 from ClickHouse/query-result-cache
Query result cache [experimental]
2023-01-23 19:54:35 +01:00
Vladimir C
121adf309d
Merge branch 'master' into vdimir/grace_join_mem 2023-01-23 19:39:03 +01:00
vdimir
5be2b31e67
Review fixes 2023-01-23 18:09:26 +00:00
Maksim Kita
7b48c75e82
Merge pull request #45485 from kitaisreal/remove-unnecessary-get-total-row-count-function-calls
Remove unnecessary getTotalRowCount function calls
2023-01-23 21:02:51 +03:00
Dmitry Novik
796b362e2d Make ColumnNode::isEqualImpl more strict 2023-01-23 17:33:57 +00:00
avogar
73538117eb Fix and add a test 2023-01-23 16:24:00 +00:00
AVMusorin
82f194fbc6
added mutex for increaseProcessedSize 2023-01-23 17:15:50 +01:00
Kruglov Pavel
af2c1bac6a
Fix typo 2023-01-23 17:13:16 +01:00
Kseniia Sumarokova
8ec39ab6f3
Merge pull request #45442 from kssenii/minor-changes
Minor improvements around reading from remote
2023-01-23 15:46:30 +01:00
Nikolay Degterinsky
f9960361db Fix MSan build 2023-01-23 14:38:07 +00:00
Alexander Tokmakov
a182a6b851
Merge pull request #45493 from azat/fix-detach
Fix possible in-use table after DETACH
2023-01-23 17:36:45 +03:00
Kruglov Pavel
84200be7d2
Better comment 2023-01-23 15:31:07 +01:00
Kruglov Pavel
3b53b195be
Fix special build 2023-01-23 15:27:36 +01:00
Kruglov Pavel
fd7e04a96d
Merge pull request #45446 from kssenii/fix-assertion-in-cache-over-local
Fix Buffer's offsets mismatch logical error in stress test
2023-01-23 14:38:25 +01:00
Kseniia Sumarokova
16ffed2c0e
Merge pull request #45502 from azat/dist/fix-race-on-create
Fix a race between Distributed table creation and INSERT into it
2023-01-23 14:38:11 +01:00
Anton Popov
61b0c4da38
Merge pull request #45498 from CurtizJ/fix-race-parallel-parsing
Fix abort in destructor of `ParallelParsingInputFormat`
2023-01-23 14:12:53 +01:00
Aleksandr
2caeed901b
Merge branch 'master' into fix_backup_restore_num_files 2023-01-23 13:43:20 +01:00
vdimir
dac86d48d2
fixing join data was released 2023-01-23 12:34:36 +00:00
Sergei Trifonov
0fbfa17863
Merge branch 'master' into cancellable-mutex-integration 2023-01-23 12:44:09 +01:00
Azat Khuzhin
51019bc9f3 Fix a race between Distributed table creation and INSERT into it
Initializing queues for pending on-disk files for async INSERT cannot be
done after table had been attached and visible to user, since it
initializes the per-table counter, that is used during INSERT.

Now there is a window, when this counter is not initialized and it will
start from the beginning, and this could lead to CANNOT_LINK error:

    Destination file /data/clickhouse/data/urls_v1/urls_in/shard6_replica1/13129817.bin is already exist and have different inode

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-23 09:55:43 +01:00
Smita Kulkarni
383af7f3a6 Moved settings inside backups section - Updated backup/restore status when concurrent backups & restores are not allowed 2023-01-23 08:59:44 +01:00
Anton Popov
8a39337c7c add fields to table system.formats 2023-01-23 02:04:31 +00:00
Anton Popov
f181254fb0 fix race in destructor of ParallelParsingInputFormat 2023-01-23 01:18:58 +00:00
kssenii
dfac0bb42d Fix stress test 2023-01-22 20:31:49 +01:00
Kseniia Sumarokova
c3d545b64a
Merge pull request #45489 from azat/build/queue-fwd-decl
Forward declaration of ConcurrentBoundedQueue in ThreadStatus
2023-01-22 20:23:05 +01:00
Smita Kulkarni
310ae62d90 Updated backup/restore status when concurrent backups & restores are not allowed
Implementation:
* Moved concurrent backup/restore check inside try-catch block which sets the status so that other nodes in cluster are aware of failures.
* Renamed backup_uuid to restore_uuid in RestoreSettings.
Testing:
* Updated test test_backup_and_restore_on_cluster/test_disallow_concurrency to check for specific backup/restore id.
2023-01-22 19:01:09 +01:00
Robert Schulze
4ece499f19
Fix build 2023-01-22 12:26:03 +00:00
Robert Schulze
340f406553
Merge branch 'master' into query-result-cache 2023-01-22 13:21:36 +01:00
Robert Schulze
531e64dc39
Merge branch 'master' into inv-index-cleanup 2023-01-22 13:20:38 +01:00
Azat Khuzhin
ca8af3d18c Fix possible in-use table after DETACH
Right now in case of DETACH/ATTACH there can be a window when after the
table had been DETACH'ed someone will still use it, the common example
here is MVs handling.

It happens because TableExclusiveLockHolder does not guards the
shard_ptr of the IStorage, and so if someone holds it, then it can use
it. So if ATTACH will be done for this table then, you can have multiple
instances of it.

It is not possible for DROP, because before using a table, you should
lock it and after table had been DROP'ed you cannot lock it anymore.

So let's do the same for DETACH.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-22 13:18:56 +01:00
Alexander Gololobov
91fb1eab8c
Merge pull request #45373 from ClickHouse/throttler-metrics
Add detailed profile events for throttling
2023-01-22 11:20:45 +01:00
Alexander Tokmakov
1174eaa132
Merge pull request #45492 from azat/revert/dist/async-INSERT-metrics
Revert "Merge pull request #44922 from azat/dist/async-INSERT-metrics"
2023-01-22 00:45:10 +03:00
Azat Khuzhin
a55798626a Revert "Merge pull request #44922 from azat/dist/async-INSERT-metrics"
There are the following problems with this patch:
- Looses files on exception
- Existing current_batch.txt on startup leads to ENOENT error and hung
  of distributed sends without ATTACH/DETACH
- Race between creating the queue for sending at table startup and
  INSERT, if it had been created from INSERT, then it will not be
  initialized from disk

They were addressed in #45491, but it makes code more cmoplex and plus
since, likely, the release is comming, it is better to revert the
change.

This reverts commit 94604f71b7, reversing
changes made to 80f6a45376.
2023-01-21 22:42:00 +01:00
Robert Schulze
430203de79
Fix typo 2023-01-21 19:46:18 +00:00
Robert Schulze
97d1bed114
Merge branch 'master' into improve_week_day 2023-01-21 20:40:33 +01:00
Maksim Kita
19f1bae5ed
Merge pull request #45254 from kitaisreal/planner-small-fixes
Planner small fixes
2023-01-21 19:54:17 +03:00
Maksim Kita
6594aa8f1e
Merge pull request #44234 from kitaisreal/analyzer-expired-context-crash-fix
Analyzer expired Context crash fix
2023-01-21 18:49:50 +03:00
Azat Khuzhin
2a8f116c18 Forward declaration of ConcurrentBoundedQueue in ThreadStatus
ThreadStatus is the header that recomplies almost all ClickHouse
modules.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 16:02:09 +01:00
Vitaly Baranov
5ceb64accc Use new copy s3 functions in S3ObjectStorage. 2023-01-21 15:47:58 +01:00
Aleksandr
206eb4d446
removed unused if statement for increaseProcessedSize
Co-authored-by: Vitaly Baranov <vitlibar@hotmail.com>
2023-01-21 15:07:25 +01:00
Vitaly Baranov
f0fda580d0
Merge pull request #45188 from vitlibar/backup-to-s3-memory-optimization
Optimize memory consumption during backup to S3
2023-01-21 12:37:35 +01:00
Maksim Kita
5146087db1 Fix style 2023-01-21 12:19:09 +01:00
Nikolai Kochetov
b877c484d2
Merge pull request #45481 from ClickHouse/fix-deadlock-with-allow_asynchronous_read_from_io_pool_for_merge_tree
Fix possible deadlock with allow_asynchronous_read_from_io_pool_for_merge_tree in case of exception from ThreadPool::schedule
2023-01-21 12:05:34 +01:00
Nikolai Kochetov
ec1e2436cc
Merge pull request #45450 from ClickHouse/fix-disabled-two-level-agg
Fix disabled two-level aggregation from HTTP
2023-01-21 12:01:59 +01:00
Sema Checherinda
962894afc8
Merge pull request #44909 from CheSema/intersect-prev-part
Do not merge over a gap with outdated undeleted parts
2023-01-21 11:51:21 +01:00
Maksim Kita
47385a19e7 Remove unnecessary getTotalRowCount function calls 2023-01-21 11:27:07 +01:00
Azat Khuzhin
a64f6b5f3e Fix possible (likely distributed) query hung
Recently I saw the following, the client executed long distributed query
and terminated the connection, and in this case query cancellation will
be done from PullingAsyncPipelineExecutor dtor, but during cancellation
one of nodes sent ECONNRESET, and this leads to an exception from
PullingAsyncPipelineExecutor::cancel(), and this leads to a deadlock
when multiple threads waits each others, because cancel() for
LazyOutputFormat wasn't called.

Here is as relevant portion of logs:

    2023.01.04 08:26:09.236208 [ 37968 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Debug> executeQuery: (from 10.61.13.253:44266, user: default)  TooLongDistributedQueryToPost
    ...
    2023.01.04 08:26:09.262424 [ 37968 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Trace> MergeTreeInOrderSelectProcessor: Reading 1 ranges in order from part 9_330_538_18, approx. 61440 rows starting from 0
    2023.01.04 08:26:09.266399 [ 26788 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Trace> Connection (s4.ch:9000): Connecting. Database: (not specified). User: default
    2023.01.04 08:26:09.266849 [ 26788 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Trace> Connection (s4.ch:9000): Connected to ClickHouse server version 22.10.1.
    2023.01.04 08:26:09.267165 [ 26788 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Debug> Connection (s4.ch:9000): Sent data for 2 scalars, total 2 rows in 3.1587e-05 sec., 62635 rows/sec., 68.00 B (2.03 MiB/sec.), compressed 0.4594594594594595 times to 148.00 B (4.41 MiB/sec.)
    2023.01.04 08:39:13.047170 [ 37968 ] {f2ed6149-146d-4a3d-874a-b0b751c7b567} <Error> PullingAsyncPipelineExecutor: Code: 210. DB::NetException: Connection reset by peer, while writing to socket (10.7.142.115:9000). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):

    0. ./.build/./contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1818234c in /usr/lib/debug/usr/bin/clickhouse.debug
    1. ./.build/./src/Common/Exception.cpp:69: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x1004fbda in /usr/lib/debug/usr/bin/clickhouse.debug
    2. ./.build/./src/Common/NetException.h:12: DB::WriteBufferFromPocoSocket::nextImpl() @ 0x14e352f3 in /usr/lib/debug/usr/bin/clickhouse.debug
    3. ./.build/./src/IO/BufferBase.h:39: DB::Connection::sendCancel() @ 0x15c21e6b in /usr/lib/debug/usr/bin/clickhouse.debug
    4. ./.build/./src/Client/MultiplexedConnections.cpp:0: DB::MultiplexedConnections::sendCancel() @ 0x15c4d5b7 in /usr/lib/debug/usr/bin/clickhouse.debug
    5. ./.build/./src/QueryPipeline/RemoteQueryExecutor.cpp:627: DB::RemoteQueryExecutor::tryCancel(char const*, std::__1::unique_ptr<DB::RemoteQueryExecutorReadContext, std::__1::default_delete<DB::RemoteQueryExecutorReadContext> >*) @ 0x14446c09 in /usr/lib/debug/usr/bin/clickhouse.debug
    6. ./.build/./contrib/libcxx/include/__iterator/wrap_iter.h💯 DB::ExecutingGraph::cancel() @ 0x15d2c0de in /usr/lib/debug/usr/bin/clickhouse.debug
    7. ./.build/./contrib/libcxx/include/__memory/unique_ptr.h:300: DB::PullingAsyncPipelineExecutor::cancel() @ 0x15d32055 in /usr/lib/debug/usr/bin/clickhouse.debug
    8. ./.build/./contrib/libcxx/include/__memory/unique_ptr.h:312: DB::PullingAsyncPipelineExecutor::~PullingAsyncPipelineExecutor() @ 0x15d31f4f in /usr/lib/debug/usr/bin/clickhouse.debug
    9. ./.build/./src/Server/TCPHandler.cpp:0: DB::TCPHandler::processOrdinaryQueryWithProcessors() @ 0x15cde919 in /usr/lib/debug/usr/bin/clickhouse.debug
    10. ./.build/./src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x15cd8554 in /usr/lib/debug/usr/bin/clickhouse.debug
    11. ./.build/./src/Server/TCPHandler.cpp:1904: DB::TCPHandler::run() @ 0x15ce6479 in /usr/lib/debug/usr/bin/clickhouse.debug
    12. ./.build/./contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x18074f07 in /usr/lib/debug/usr/bin/clickhouse.debug
    13. ./.build/./contrib/libcxx/include/__memory/unique_ptr.h:54: Poco::Net::TCPServerDispatcher::run() @ 0x180753ed in /usr/lib/debug/usr/bin/clickhouse.debug
    14. ./.build/./contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x181e3807 in /usr/lib/debug/usr/bin/clickhouse.debug
    15. ./.build/./contrib/poco/Foundation/include/Poco/SharedPtr.h:156: Poco::ThreadImpl::runnableEntry(void*) @ 0x181e1483 in /usr/lib/debug/usr/bin/clickhouse.debug
    16. ? @ 0x7ffff7e55fd4 in ?
    17. ? @ 0x7ffff7ed666c in ?
     (version 22.10.1.1)

And here is the state of the threads:

<details>

<summary>system.stack_trace</summary>

```sql
SELECT
    arrayStringConcat(arrayMap(x -> demangle(addressToSymbol(x)), trace), '\n') AS sym
FROM system.stack_trace
WHERE query_id = 'f2ed6149-146d-4a3d-874a-b0b751c7b567'
SETTINGS allow_introspection_functions=1

Row 1:
──────
sym:
pthread_cond_wait
std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)
bool ConcurrentBoundedQueue<DB::Chunk>::emplaceImpl<DB::Chunk>(std::__1::optional<unsigned long>, DB::Chunk&&)
DB::IOutputFormat::work()
DB::ExecutionThreadContext::executeTask()
DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*)

Row 2:
──────
sym:
pthread_cond_wait
Poco::EventImpl::waitImpl()
DB::PipelineExecutor::joinThreads()
DB::PipelineExecutor::executeImpl(unsigned long)
DB::PipelineExecutor::execute(unsigned long)

Row 3:
──────
sym:
pthread_cond_wait
Poco::EventImpl::waitImpl()
DB::PullingAsyncPipelineExecutor::Data::~Data()
DB::PullingAsyncPipelineExecutor::~PullingAsyncPipelineExecutor()
DB::TCPHandler::processOrdinaryQueryWithProcessors()
DB::TCPHandler::runImpl()
DB::TCPHandler::run()
Poco::Net::TCPServerConnection::start()
Poco::Net::TCPServerDispatcher::run()
Poco::PooledThread::run()
Poco::ThreadImpl::runnableEntry(void*)
```

</details>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 08:05:56 +01:00
Azat Khuzhin
e2fcf0f072 Catch exception on query cancellation
Since we still want to join the thread, yes it will be done in dtor, but
this looks better.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 08:05:56 +01:00
Azat Khuzhin
0566f72d36 Cleanup PullingAsyncPipelineExecutor::cancel()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-21 08:05:56 +01:00
avogar
eed1db7e07 Fix schema inference in hdfsCluster 2023-01-20 21:17:35 +00:00
Anton Popov
41a199e175
Fix crash when ListObjects request fails (#45371) 2023-01-20 20:10:23 +01:00
Nikolai Kochetov
dcd84c152a Fix possible deadlock with allow_asynchronous_read_from_io_pool_for_merge_tree in case of exception from ThreadPool::schedule 2023-01-20 18:57:47 +00:00
Robert Schulze
e6167d6b36
Deprecate Gorilla compression of non-float columns
Reasons:

1. The original Gorilla paper proposed a compression schema for pairs of
   time stamps and double-precision FP values. ClickHouse's Gorilla
   codec only implements compression of the latter and it does not
   impose any data type restrictions.
   - Data types != Float* or (U)Int* (e.g. Decimal, Point etc.) are
     definitely not supposed to be used with Gorilla.
   - (U)Int* types are debatable. The paper only considers
     integers-stored-as-FP-values, a practical use case for which
     Gorilla works well. Standalone integers are not considered which
     makes them at least suspicious.

2. Achieve consistency with FPC, another specialized floating-point
   timeseries codec, which rejects non-float data.

3. On practical datasets, ZSTD is often "good enough" (**) so it should
   be okay to disincentive non-ZSTD codecs a little bit. If needed,
   Delta and DoubleDelta codecs are viable alternative for slowly
   changing (time-series-like) integer sequences.

Since on-prem and hosted users may still have Gorilla-compressed
non-float data, this combination is only deprecated for now. No warning
or error will be emitted. Users are encouraged to migrate
Gorilla-compressed non-float data to an alternative codec. It is planned
to treat Gorilla-compressed non-float columns as "suspicious" six months
after this commit (i.e. in v23.6). Even then, it will still be possible
to set "allow_suspicious_codecs = true" and read and write
Gorilla-compressed non-float data.

(*) Sec. 4.1.2, "Gorilla restricts the value element in its tuple to a
    double floating point type.", https://doi.org/10.14778/2824032.2824078

(**) https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema
2023-01-20 17:31:16 +00:00
robot-ch-test-poll4
2066581d8f
Merge pull request #45451 from evillique/default_granularity
Add default GRANULARITY argument for secondary indexes
2023-01-20 17:46:21 +01:00
avogar
86336940f8 Better comment 2023-01-20 16:41:59 +00:00
avogar
4432ee9927 Fix aborts in arrow lib 2023-01-20 16:40:33 +00:00
vdimir
e30ab0874b
Review fixes 2023-01-20 16:30:34 +00:00
Alexander Tokmakov
910d6dc0ce
Merge pull request #45342 from ClickHouse/exception_message_patterns
Save message format strings for DB::Exception
2023-01-20 18:46:52 +03:00
Kseniia Sumarokova
01320da02b
Update BoundedReadBuffer.cpp 2023-01-20 16:25:02 +01:00
ltrk2
810c9ba50c Produce a null map of the correct size 2023-01-20 10:24:42 -05:00
ltrk2
9d798ea1bc Document functions 2023-01-20 10:24:42 -05:00
ltrk2
65b9c69c90 Introduce non-throwing variants of hasToken 2023-01-20 10:24:42 -05:00
avogar
550a703fbc Make a bit better 2023-01-20 14:58:39 +00:00
Antonio Andelic
136e4ec1b3
Merge pull request #45273 from azat/fix-test-log-level
Fix log level "Test" for send_logs_level in client
2023-01-20 15:36:05 +01:00
Alexander Tokmakov
ec5d7d0a3a
Update src/Functions/FunctionsConversion.h
Co-authored-by: Alexander Gololobov <440544+davenger@users.noreply.github.com>
2023-01-20 17:33:01 +03:00
Kruglov Pavel
28ddcc2432
Merge branch 'master' into tsv-csv-detect-header 2023-01-20 15:08:38 +01:00
Sema Checherinda
b76b612d23
fix typo 2023-01-20 14:55:58 +01:00
Nikolai Kochetov
039901b395 Fixing build 2023-01-20 13:49:50 +00:00
Robert Schulze
1a966a9590
Fix bad comparison 2023-01-20 13:05:06 +00:00
Sema Checherinda
02f22f04e8
fix typos 2023-01-20 13:35:23 +01:00
kssenii
8d20af8127 Fix 2023-01-20 13:34:23 +01:00
Azat Khuzhin
bdeb5514c5 Fix ASan builds for glibc 2.36+ (use RTLD_NEXT for ThreadFuzzer interceptors)
Recently I noticed that clickhouse compiled with ASan does not work with
newer glibc 2.36+, before I though that this was only about compiling
with old but using new, however that was not correct, ASan simply does
not work with glibc 2.36+.

Here is a simple reproducer [1]:

    $ cat > test-asan.cpp <<EOL
    #include <pthread.h>
    int main()
    {
        // something broken in ASan in interceptor for __pthread_mutex_lock
        // and only since glibc 2.36, and for pthread_mutex_lock everything is OK
        pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
        return __pthread_mutex_lock(&mutex);
    }
    EOL
    $ clang -g3 -o test-asan test-asan.cpp -fsanitize=address
    $ ./test-asan
    AddressSanitizer:DEADLYSIGNAL
    =================================================================
    ==15659==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000000000 bp 0x7fffffffccb0 sp 0x7fffffffcb98 T0)
    ==15659==Hint: pc points to the zero page.
    ==15659==The signal is caused by a READ memory access.
    ==15659==Hint: address points to the zero page.
        #0 0x0  (<unknown module>)
        #1 0x7ffff7cda28f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)

    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (<unknown module>)
    ==15659==ABORTING

  [1]: https://gist.github.com/azat/af073e57a248e04488b21068643f079e

I've started observing glibc code, there was some changes in glibc, that
moves pthread functions out from libpthread.so.0 into libc.so.6
(somewhere between 2.31 and 2.35), but
the problem pops up only with 2.36, 2.35 works fine.

After this I've looked into changes between 2.35 and 2.36, and found
this patch [2] - "dlsym: Make RTLD_NEXT prefer default version
definition [BZ #14932]", that fixes this bug [3].

  [2]: https://sourceware.org/git/?p=glibc.git;a=commit;h=efa7936e4c91b1c260d03614bb26858fbb8a0204
  [3]: https://sourceware.org/bugzilla/show_bug.cgi?id=14932

The problem with using DL_LOOKUP_RETURN_NEWEST flag for RTLD_NEXT is
that it does not resolve hidden symbols (and __pthread_mutex_lock is
indeed hidden).

Here is a sample that will show the difference [4]:

    $ cat > test-dlsym.c <<EOL
    #define _GNU_SOURCE
    #include <dlfcn.h>
    #include <stdio.h>

    int main()
    {
        void *p = dlsym(RTLD_NEXT, "__pthread_mutex_lock");
        printf("__pthread_mutex_lock: %p (via RTLD_NEXT)\n", p);
        return 0;
    }
    EOL

    # glibc 2.35: __pthread_mutex_lock: 0x7ffff7e27f70 (via RTLD_NEXT)
    # glibc 2.36: __pthread_mutex_lock: (nil) (via RTLD_NEXT)

  [4]: https://gist.github.com/azat/3b5f2ae6011bef2ae86392cea7789eb7

But ThreadFuzzer uses internal symbols to wrap
pthread_mutex_lock/pthread_mutex_unlock, which are intercepted by ASan
and this leads to NULL dereference.

The fix was obvious - just use dlsym(RTLD_NEXT), however on older
glibc's this leads to endless recursion (see commits in the code). But
only for jemalloc [5], and even though sanitizers does not uses jemalloc
the code of ThreadFuzzer is generic and I don't want to guard it with
more preprocessors macros.

  [5]: https://gist.github.com/azat/588d9c72c1e70fc13ebe113197883aa2

So we have to use RTLD_NEXT only for ASan.

There is also one more interesting issue, if you will compile with clang
that itself had been compiled with newer libc (i.e. 2.36), you will get
the following error:

    $ podman run --privileged -v $PWD/.cmake-asan/programs:/root/bin -e PATH=/bin:/root/bin -e --rm -it ubuntu-dev-v3 clickhouse
    ==1==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)
    ...
    ==1==End of process memory map.
    AddressSanitizer: CHECK failed: sanitizer_common.cpp:53 "((0 && "unable to mmap")) != (0)" (0x0, 0x0) (tid=1)
        <empty stack>

The problem is that since GLIBC_2.31, `SIGSTKSZ` is a call to
`getconf(_SC_MINSIGSTKSZ)`, but older glibc does not have it, so `-1`
will be returned and used as `SIGSTKSZ` instead.

The workaround to disable alternative stack:

    $ podman run --privileged -v $PWD/.cmake-asan/programs:/root/bin -e PATH=/bin:/root/bin -e ASAN_OPTIONS=use_sigaltstack=0 --rm -it ubuntu-dev-v3 clickhouse client --version
    ClickHouse client version 22.13.1.1.

Fixes: #43426
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-20 13:09:13 +01:00
Robert Schulze
bfc3b4f5ca
Suffix "GinFilter" --> "Inverted" 2023-01-20 12:02:35 +00:00
Nikolai Kochetov
1e29993aef Fixing build 2023-01-20 11:55:20 +00:00
Robert Schulze
0738b2499c
Use GinFilters typedef where possible 2023-01-20 11:52:04 +00:00
Maksim Kita
3e08a98f16
Merge pull request #45388 from azat/dict/remove-preallocate
Remove PREALLOCATE for HASHED/SPARSE_HASHED dictionaries
2023-01-20 14:51:25 +03:00
Robert Schulze
0b77f07f67
Remove superfluous check (the same is checked in MergeTreeIndices.cpp) 2023-01-20 11:50:35 +00:00
Robert Schulze
d2c830ec39
Cosmetics 2023-01-20 11:49:08 +00:00
Robert Schulze
72973076c9
Rename MergeTreeIndexGin.h/cpp to MergeTreeIndexInverted.h/cpp 2023-01-20 11:42:36 +00:00
Robert Schulze
1ef2704539
Cosmetics 2023-01-20 11:39:23 +00:00
Anton Popov
9c0ba7c7ca
Merge pull request #45432 from CurtizJ/allow-json-extract-int-from-float
Allow to convert float stored in string field to integer in `JSONExtract`
2023-01-20 12:35:06 +01:00
Robert Schulze
463cc843de
"segment file" --> "segment metadata file" 2023-01-20 11:26:22 +00:00
Robert Schulze
58df3953bb
Move some code around (no other changes) 2023-01-20 11:24:23 +00:00
Kseniia Sumarokova
c066b9bddd
Update SwapHelper.h 2023-01-20 12:19:19 +01:00
Maksim Kita
e067a55b78 Fixed tests 2023-01-20 12:19:16 +01:00
Robert Schulze
3267ac2787
Prefix more typedefs in DB namespace with "Gin" 2023-01-20 11:19:07 +00:00
Robert Schulze
919b67f117
Cosmetics 2023-01-20 11:15:28 +00:00
Sema Checherinda
09f3a5c599 add a comment, add a check, fix test 2023-01-20 12:10:31 +01:00
Robert Schulze
98e117dca6
SegmentDictionary --> GinSegmentDictionary, also move typedef 2023-01-20 11:09:49 +00:00
Robert Schulze
908fa83f72
Move some typedefs around 2023-01-20 11:08:19 +00:00
Robert Schulze
44618927f9
Inline two short methods + uppercase 2023-01-20 11:04:35 +00:00
Robert Schulze
f8b446f517
Move method implementations (no other changes) 2023-01-20 10:57:16 +00:00
Robert Schulze
5c3cc5283f
"term dictionary" --> "dictionary" 2023-01-20 10:53:41 +00:00
Robert Schulze
be936b257c
Make version enum private 2023-01-20 10:48:43 +00:00
Robert Schulze
0653f86de9
Various cosmetic cleanups 2023-01-20 10:45:35 +00:00
Maksim Kita
23e26032ca
Merge pull request #45399 from aalexfvk/alexfvk/mdb-21326_fix_system_dictionaries_when_dictionary_with_bad_structure
Fix select from system.dictionaries when there is dictionary with bad structure
2023-01-20 13:36:32 +03:00
Maksim Kita
758c8f2776
Merge branch 'master' into dict/remove-preallocate 2023-01-20 13:15:37 +03:00
Maksim Kita
e6ee5554d1 Fixed tests 2023-01-20 11:15:13 +01:00
Azat Khuzhin
1f9a65b875 Modernize InternalTextLogsQueue::getPriorityName()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-20 11:09:35 +01:00
Azat Khuzhin
fc276abadd Fix log level "Test" for send_logs_level in client
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-20 11:09:35 +01:00
Antonio Andelic
0ad37ad286
Merge pull request #45320 from stigsb/system_tables_volume_config
Add <storage_policy> config parameter for system logs
2023-01-20 10:27:57 +01:00
Aleksandr Musorin
838acb22b7
added num_processed_files and processed_files_size 2023-01-20 10:20:41 +01:00
Robert Schulze
5ec6d89d43
Merge pull request #38667 from ClibMouse/ftsearch
Inverted Indices Implementation
2023-01-20 10:18:05 +01:00
SmitaRKulkarni
6aa63414db
Merge pull request #45072 from ClickHouse/43891_Disallow_concurrent_backups_and_restores
Added settings to disallow concurrent backups and restores
2023-01-20 09:17:20 +01:00
Nikolai Kochetov
3e00d18498 Merge branch 'master' into fix-disabled-two-level-agg 2023-01-19 20:54:04 +00:00
Nikolay Degterinsky
dd7fef11a2 Add default granularity 2023-01-19 20:52:38 +00:00
Nikolai Kochetov
d24be2712e Fix disabled two-level aggregation from HTTP 2023-01-19 20:50:27 +00:00
Maksim Kita
3363f7c718 Added GroupingFunctionsResolvePass 2023-01-19 19:06:02 +01:00
Maksim Kita
506f91b841 Fixed tests 2023-01-19 19:05:49 +01:00
Maksim Kita
2c56b0b2b9 Planner small fixes 2023-01-19 19:05:49 +01:00
Kseniia Sumarokova
ad4a9d2880
Update SwapHelper.h 2023-01-19 18:58:09 +01:00
kssenii
f56f515392 Fix 2023-01-19 18:45:06 +01:00
Anton Popov
089d1f5b62 fix fuzzer 2023-01-19 17:03:24 +00:00
kssenii
4ce8950712 Minor changes 2023-01-19 17:53:10 +01:00
larryluogit
52ae33dba7
Merge branch 'master' into ftsearch 2023-01-19 11:34:11 -05:00
avogar
c34c0aa22e Fix comments 2023-01-19 16:03:46 +00:00
Han Fei
3007507a8b
Merge pull request #45428 from hanfei1991/hanfei/fix-empty-expressions
fix regexp logical error in stress tests
2023-01-19 16:39:39 +01:00
Kruglov Pavel
9820beae68
Apply suggestions from code review
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2023-01-19 16:11:13 +01:00
Anton Popov
4ca359d57b
Merge pull request #45418 from CurtizJ/fix-disk-encrypted
Fix reading from encrypted disk with passed file size
2023-01-19 16:11:08 +01:00
Anton Popov
7f2e37860d allow to convert float stored in string field to integer in JSONExtract 2023-01-19 14:24:55 +00:00
Aleksei Filatov
afada0ecb3 Fix review notes 2023-01-19 17:02:57 +03:00
Alexander Tokmakov
7bb65cc002
Update StorageReplicatedMergeTree.cpp 2023-01-19 16:45:41 +03:00
Igor Nikonov
d0ce804bfc Fix: dynamic_cast -> typeid_cast for SortingStep 2023-01-19 13:40:21 +00:00
Han Fei
94336a9b66 fix typo 2023-01-19 13:55:29 +01:00
Igor Nikonov
df3776d24b Make test stable
+ disable debug logging
2023-01-19 11:43:40 +00:00
Han Fei
2884b8837b fix regexp logical error in stress tests 2023-01-19 12:03:54 +01:00
SmitaRKulkarni
67e2bf31f5
Merge branch 'master' into 43891_Disallow_concurrent_backups_and_restores 2023-01-19 11:21:37 +01:00
Han Fei
f661dad0e9
Merge pull request #45106 from hanfei1991/hanfei/async-cache
support cache for async inserts block ids
2023-01-19 10:59:25 +01:00
Ilya Yatsishin
d16b59b662
Merge pull request #45422 from Avogar/fix-s3-cluser-si 2023-01-19 10:36:54 +01:00
Ilya Yatsishin
00962b7ad5
Merge pull request #45424 from Avogar/fix-json-import-nested 2023-01-19 10:31:40 +01:00
Stig Bakken
420c179b55 Add <storage_policy> config parameter for system logs 2023-01-19 10:25:28 +01:00
SmitaRKulkarni
db03dd1bb9
Merge branch 'master' into 43891_Disallow_concurrent_backups_and_restores 2023-01-19 09:32:50 +01:00
Maksim Kita
911bb8e6ab
Merge pull request #45410 from ClickHouse/revert-45406-revert-42797-or-like-chain
Resubmit Support optimize_or_like_chain in QueryTreePassManager
2023-01-19 11:30:45 +03:00
Yakov Olkhovskiy
c6ee4c3908
Merge pull request #44686 from Algunenano/fix_uuid_parsing_in_values
Don't parse beyond the quotes when reading UUIDs
2023-01-18 19:30:53 -05:00
Igor Nikonov
57d2fd300a Fix: correct update of data stream sorting properties after removing
sorting
2023-01-19 00:11:58 +00:00
Yakov Olkhovskiy
1d58ded72b fix IP parsers to treat input as not whole string 2023-01-19 00:08:20 +00:00
avogar
a8f20363f4 Fix JSON/BSONEachRow parsing with HTTP 2023-01-18 22:49:03 +00:00
avogar
117ec13c9e Fix s3Cluster schema inference when structure from insertion table is used 2023-01-18 20:33:50 +00:00
Azat Khuzhin
4366f7fb3b Remove PREALLOCATE for HASHED/SPARSE_HASHED dictionaries
It does not give significant benefit, but now, you hashed/sparse_hashed
dictionaries can be filled in parallel (#40003), using sharded
dictionaries, and this should be used instead of PREALLOCATE.

Note, that dictionaries, that had been created with PREALLOCATE will
work, but simply ignore this attribute.

Fixes: #41985 (cc @alexey-milovidov)
Reverts: #23979 (cc @kitaisreal)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-18 20:18:37 +01:00
Igor Nikonov
1866f990de
Revert "Revert "Remove redundant sorting"" 2023-01-18 20:12:34 +01:00
Anton Popov
65a71b4431 fix reading from encrypted disk 2023-01-18 19:02:20 +00:00
Dmitry Novik
fff9fd4f00 Remove redundant group by keys with constants 2023-01-18 17:44:06 +00:00
Igor Nikonov
7ed8fec94f
Revert "Remove redundant sorting" 2023-01-18 18:38:25 +01:00
Dmitry Novik
11701d0ff5 Resolve OR function after modification 2023-01-18 17:17:16 +00:00
Dmitry Novik
df26f4fc37
Revert "Revert "Support optimize_or_like_chain in QueryTreePassManager"" 2023-01-18 18:14:03 +01:00
Anton Popov
5df0f91857
Revert "Support optimize_or_like_chain in QueryTreePassManager" 2023-01-18 17:34:19 +01:00
Maksim Kita
cabcc761ed
Merge pull request #45357 from kitaisreal/analyzer-compound-identifier-typo-correction-fix
Analyzer compound identifier typo correction fix
2023-01-18 17:59:32 +03:00
Aleksei Filatov
5e9340f682 Add integration test 2023-01-18 17:50:38 +03:00
Aleksei Filatov
7f4a01b903 Add handling of bad dictionary structure 2023-01-18 17:27:03 +03:00
Sema Checherinda
ae1dfb9ce5
Update src/Storages/MergeTree/MergeTreeData.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
2023-01-18 15:21:11 +01:00
Sema Checherinda
a344b526a6
Update src/Storages/StorageMergeTree.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
2023-01-18 15:16:18 +01:00
Alexander Tokmakov
7a824af09e fix 2023-01-18 14:30:20 +01:00
Antonio Andelic
8f8b14148a
Merge pull request #45215 from ClickHouse/fix-crash-kv-store
Fix crash when prepared set with different type used in KV stores
2023-01-18 13:27:40 +01:00
Igor Nikonov
72066846cf
Merge pull request #43905 from ClickHouse/igor/remove_redundant_order_by
Remove redundant sorting
2023-01-18 13:25:03 +01:00
vdimir
b76779797a
Do not move to prewhere in select with joins 2023-01-18 12:17:30 +00:00
Vitaly Baranov
7cdb2c4c7f
Merge pull request #45351 from vitlibar/fix-backup-with-killed-mutations
Fix backup with killed mutations
2023-01-18 13:14:27 +01:00
Han Fei
e51123c9b0 fix data race 2023-01-18 13:11:07 +01:00
Maksim Kita
8225d2814c
Merge pull request #40003 from azat/dict-shards
Add ability to load hashed dictionaries using multiple threads
2023-01-18 13:37:10 +03:00
Maksim Kita
3a550691c9
Merge pull request #42797 from ClickHouse/or-like-chain
Support optimize_or_like_chain in QueryTreePassManager
2023-01-18 13:09:33 +03:00
Maksim Kita
21b94813ad Fixed code review issues 2023-01-18 11:02:29 +01:00
Maksim Kita
cacaa2372a
Merge pull request #43261 from ClickHouse/group-by-function-elimination
Support optimize_group_by_function_keys on top of QueryTree
2023-01-18 12:55:56 +03:00
Maksim Kita
21b288c620 Fixed build 2023-01-18 10:44:40 +01:00
Antonio Andelic
cfba9b19eb
Merge pull request #45360 from azat/dist/fix-startup-race
Fix race in Distributed table startup
2023-01-18 10:09:54 +01:00
Antonio Andelic
f57ee043ae
Merge pull request #45319 from ClickHouse/disable-prewhere-in-merge-different-types
Disable PREWHERE in storage Merge if types don't match
2023-01-18 10:02:06 +01:00
Antonio Andelic
f3469ee077
Merge branch 'master' into dist/fix-startup-race 2023-01-18 09:44:52 +01:00
Smita Kulkarni
d7ca742d98 Fixed style check for beginning of if - Added settings to disallow concurrent backups and restores 2023-01-18 08:59:47 +01:00
Dmitry Novik
3b0ac7272c Update reference files 2023-01-18 00:30:30 +00:00
Dmitry Novik
752aed696a Merge remote-tracking branch 'origin/master' into group-by-function-elimination 2023-01-17 23:33:33 +00:00
Sergei Trifonov
c443c1ece0
Merge branch 'master' into hanfei/async-cache 2023-01-18 00:19:49 +01:00
Robert Schulze
4f90824347
Merge remote-tracking branch 'origin/master' into query-result-cache 2023-01-17 22:49:53 +00:00
Anton Popov
f40fd7a151
Add checks for compilation of regexps (#45356) 2023-01-17 23:46:04 +01:00
Smita Kulkarni
ee526ce877 Fix style check - Added settings to disallow concurrent backups and restores 2023-01-17 22:52:55 +01:00
Smita Kulkarni
6e06af1b25 Updated strategy for handling internal backups & restores to avoid concurrent internal backups & restores - Added settings to disallow concurrent backups and restores 2023-01-17 22:27:13 +01:00
Igor Nikonov
0db9bf38a2
Merge branch 'master' into igor/remove_redundant_order_by 2023-01-17 22:26:24 +01:00
Alexander Tokmakov
1413b9537c make error patterns more useful 2023-01-17 20:04:25 +01:00
Alexander Tokmakov
5cd90c1a3e Merge branch 'master' into exception_message_patterns 2023-01-17 20:04:04 +01:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
Maksim Kita
4f7f2ed9e1
Merge pull request #45300 from ClickHouse/revert-45299-revert-44882-function-node-validation
Revert "Revert "Validate function arguments in query tree""
2023-01-17 21:51:26 +03:00
Maksim Kita
273610ce65
Merge pull request #43640 from ClickHouse/42648_Support_scalar_subqueries_cache
Support scalar subqueries cache
2023-01-17 21:31:13 +03:00
serxa
ce7e22b87b add detailed profile events for throttling 2023-01-17 18:29:24 +00:00
alesapin
e732f510f0
Merge branch 'master' into fix_hang_during_drop_in_zero_copy_replication 2023-01-17 19:24:36 +01:00
Alexander Tokmakov
8b13b85ea0
Merge pull request #44543 from ClickHouse/text_log_add_pattern
Add a column with a message pattern to text_log
2023-01-17 20:19:32 +03:00
Vitaly Baranov
1a680b0092 Abort multipart upload faster. 2023-01-17 18:00:11 +01:00
Vitaly Baranov
2de455367a Fix using std::ios_base::end in StdStreamFromReadBuffer::seekg(). 2023-01-17 17:56:14 +01:00
Igor Nikonov
0cfa08df7a Merge remote-tracking branch 'origin/master' into igor/remove_redundant_order_by 2023-01-17 16:28:17 +00:00
Igor Nikonov
9855504403 Rename source file according to implementation 2023-01-17 16:24:51 +00:00
Nikita Mikhaylov
0fc755806e
One more attempt to fix race in TCPHandler (#45240) 2023-01-17 16:17:14 +01:00
alesapin
69925647eb Fix style 2023-01-17 15:59:55 +01:00
alesapin
f6131101bb Fix no shared id during drop for the fourth time 2023-01-17 15:51:49 +01:00
Han Fei
8a74238fe0 improve 2023-01-17 15:47:52 +01:00
Kruglov Pavel
96bb99f864
Merge branch 'master' into tsv-csv-detect-header 2023-01-17 15:33:02 +01:00
Kruglov Pavel
582aa8b770
Merge pull request #45253 from Avogar/fix-s3-heap-use-after-free
Fix heap-use-after-free in reading from s3
2023-01-17 15:32:26 +01:00
HarryLeeIBM
e7add8218f Addressed more review comments and ClangTidy errors 2023-01-17 06:29:13 -08:00
Kruglov Pavel
4183f6082f
Fix special build 2023-01-17 15:18:39 +01:00
Azat Khuzhin
54fc6859ae Fix race in Distributed table startup
Before this patch it was possible to have multiple directory monitors
for the same directory, one from the INSERT context, another one on
storage startup().

Here are an example of logs for this scenario:

    2022.12.07 12:12:27.552485 [ 39925 ] {a47fcb32-4f44-4dbd-94fe-0070d4ea0f6b} <Debug> DDLWorker: Executed query: DETACH TABLE inc.dist_urls_in
    ...
    2022.12.07 12:12:33.228449 [ 4408 ] {20c761d3-a46d-417b-9fcd-89a8919dd1fe} <Debug> executeQuery: (from 0.0.0.0:0, user: ) /* ddl_entry=query-0000089229 */ ATTACH TABLE inc.dist_urls_in (stage: Complete)
    ... this is the DirectoryMonitor created from the context of INSERT for the old StoragePtr that had not been destroyed yet (becase of "was 1" this can be done only from the context of INSERT) ...
    2022.12.07 12:12:35.556048 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Files set to 173 (was 1)
    2022.12.07 12:12:35.556078 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Bytes set to 29750181 (was 71004)
    2022.12.07 12:12:35.562716 [ 39536 ] {} <Trace> Connection (i13.ch:9000): Connected to ClickHouse server version 22.10.1.
    2022.12.07 12:12:35.562750 [ 39536 ] {} <Debug> inc.dist_urls_in.DirectoryMonitor: Sending a batch of 10 files to i13.ch:9000 (0.00 rows, 0.00 B bytes).
    ... this is the DirectoryMonitor that created during ATTACH ...
    2022.12.07 12:12:35.802080 [ 39265 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Files set to 173 (was 0)
    2022.12.07 12:12:35.802107 [ 39265 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Bytes set to 29750181 (was 0)
    2022.12.07 12:12:35.834216 [ 39265 ] {} <Debug> inc.dist_urls_in.DirectoryMonitor: Sending a batch of 10 files to i13.ch:9000 (0.00 rows, 0.00 B bytes).
    ...
    2022.12.07 12:12:38.532627 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Sent a batch of 10 files (took 2976 ms).
    ...
    2022.12.07 12:12:38.601051 [ 39265 ] {} <Error> inc.dist_urls_in.DirectoryMonitor: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in file_size: No such file or directory ["/data6/clickhouse/data/inc/dist_urls_in/shard13_replica1/66827403.bin"], Stack trace (when copying this message, always include the lines below):
    ...
    2022.12.07 12:12:54.132837 [ 4408 ] {20c761d3-a46d-417b-9fcd-89a8919dd1fe} <Debug> DDLWorker: Executed query: ATTACH TABLE inc.dist_urls_in

And eventually both monitors (for a short period of time, one replaces
another) are trying to process the same batch (current_batch.txt), and
one of them fails because such file had been already removed.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-17 14:51:00 +01:00
Igor Nikonov
6328e02f22 Fix: update input/output stream properties
After removing sorting step we need to update sorting properties of
input/ouput streams
2023-01-17 13:39:18 +00:00
Maksim Kita
d758d83937 Analyzer compound identifier typo correction fix 2023-01-17 14:29:48 +01:00
vdimir
60acd5e424
fix clang tidy 2023-01-17 12:21:56 +00:00
vdimir
1e9ccfb4b9
wip 2023-01-17 12:21:56 +00:00
vdimir
40bf9939b7
Update JoinSwitcher::switchJoin 2023-01-17 12:21:55 +00:00
vdimir
e0e60bb460
wip 2023-01-17 12:21:55 +00:00
vdimir
4aecb836a9
Fix JoinMask 2023-01-17 12:21:55 +00:00
vdimir
18d751aed4
wip 2023-01-17 12:21:54 +00:00
vdimir
beb8ba7e62
wip 2023-01-17 12:21:54 +00:00
vdimir
57a35cae33
wip 2023-01-17 12:21:53 +00:00
vdimir
efcfcca545
Fix HashJoin::getTotalByteCount caclulation 2023-01-17 12:21:53 +00:00
vdimir
b0c4e18464
Fix double initialization GraceHashJoin::initBuckets 2023-01-17 12:21:53 +00:00
Sema Checherinda
35431e91e3
Merge pull request #45276 from ucasfl/avro-fix
Fix some avro reading bugs
2023-01-17 12:48:44 +01:00
Kseniia Sumarokova
5586f71950
Merge pull request #41231 from kssenii/minor-change-in-remote-read
Fix assertion in async read buffer from remote
2023-01-17 12:32:57 +01:00
Maksim Kita
d6a36b1d16 Fixed code review issues 2023-01-17 12:02:50 +01:00
Maksim Kita
af716ca25d Fixed tests 2023-01-17 11:20:24 +01:00
Maksim Kita
250c93614c Revert "Revert "Validate function arguments in query tree"" 2023-01-17 11:20:24 +01:00
Vitaly Baranov
692065e5fe Fix backup if mutations got killed during the backup process. 2023-01-17 11:05:34 +01:00
Vitaly Baranov
0bea056241 Fix build. 2023-01-17 09:52:08 +01:00
Vitaly Baranov
1c845185c1 Split upload into parts of the same size for smooth uploading.
Correctly use AbortMultipleUpload request.
Support std::ios_base::end StdStreamBufFromReadBuffer::seekpos().
2023-01-17 09:35:43 +01:00
Vitaly Baranov
14a7ee8e26 Copy files to S3 during backup directly without using WriteBufferFromS3 to decrease memory consumption. 2023-01-17 09:35:41 +01:00
Vitaly Baranov
b13498d9ba
Merge pull request #45288 from vitlibar/fix-s3-requests-without-region
Fix s3 requests without region
2023-01-17 09:24:59 +01:00
Antonio Andelic
76eb3e3b3c Fix test 2023-01-17 07:34:39 +00:00
SmitaRKulkarni
bb4f251448
Merge branch 'master' into 42648_Support_scalar_subqueries_cache 2023-01-17 08:10:25 +01:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +01:00
Kseniia Sumarokova
6a02bdc917
Update AsynchronousReadIndirectBufferFromRemoteFS.cpp 2023-01-17 00:37:47 +01:00
Alexander Tokmakov
870cfcc36a less fmt::runtime usages 2023-01-17 00:11:59 +01:00
Alexander Tokmakov
e7899825e6 save format strings for DB::Exceptions 2023-01-16 23:20:33 +01:00
Vitaly Baranov
9a52087989 More complex logic: GetObjectAttributes requests will be used
only if the endpoint is "*.amazonaws.com", otherwise HeadObject requests will be used.
2023-01-16 20:14:39 +01:00
Dmitry Novik
104e55bc22 Merge remote-tracking branch 'origin/master' into or-like-chain 2023-01-16 18:56:22 +00:00
Dmitry Novik
aa2a19eaa4 Use proper map for QueryTreeNode 2023-01-16 18:43:22 +00:00
Dmitry Novik
0aecc9ad80 Updates after the review 2023-01-16 17:43:36 +00:00
Kruglov Pavel
e9d6590926
Merge branch 'master' into tsv-csv-detect-header 2023-01-16 17:50:24 +01:00
Kruglov Pavel
bdb3517512
Merge pull request #45231 from Avogar/json-tuples
Insert default values in case of missing tuple elements in JSONEachRow
2023-01-16 17:49:50 +01:00
avogar
1c0941d72a Add docs and examples 2023-01-16 16:46:41 +00:00
Alexander Tokmakov
df75c24f01
Revert "Disallow Gorilla codec on non-float columns" 2023-01-16 19:14:28 +03:00
avogar
1d26704049 Fix 2023-01-16 15:49:59 +00:00
Sema Checherinda
dbe89cd5d8 fix that optimize final waits for currently running merges 2023-01-16 16:47:12 +01:00
Sema Checherinda
90fa1ecd49 make that old_parts_lifetime=0 deletes files instantly at drop/truncate 2023-01-16 16:47:12 +01:00
Sema Checherinda
8f660afab3 style fix 2023-01-16 16:47:12 +01:00
Sema Checherinda
c51f4d7be1 do not merge over a gap with uotdate parts, delete empty parts with respect to old_parts_lifetime 2023-01-16 16:47:11 +01:00
Sema Checherinda
25e16388d7 better message in MergeTreeDataMergerMutator when parts intersect 2023-01-16 16:47:11 +01:00
Kruglov Pavel
04d95f4877
Fix 2023-01-16 16:47:04 +01:00
avogar
3ea80b0f54 Merge branch 'master' of github.com:ClickHouse/ClickHouse into tsv-csv-detect-header 2023-01-16 15:14:25 +00:00
Antonio Andelic
108b2384e7 Disable prewhere in storage merge if types don't match 2023-01-16 13:39:46 +00:00
Anton Popov
6863cd152f
Merge pull request #42181 from CurtizJ/optimize-loading-parts
Do not load inactive parts at startup
2023-01-16 14:38:50 +01:00
Kseniia Sumarokova
57c22f005b
Merge branch 'master' into minor-change-in-remote-read 2023-01-16 14:22:16 +01:00