Commit Graph

27 Commits

Author SHA1 Message Date
Kruglov Pavel
e924aafdf6
Merge branch 'master' into fix-secure-async-read-write 2023-06-01 16:24:54 +02:00
avogar
ef9bae50b9 Fix bugs in Poco, use true non-blocking IO 2023-05-26 23:11:57 +00:00
Kruglov Pavel
67c8c5c561
Add missing include 2023-05-26 12:44:43 +02:00
Kruglov Pavel
f03ca41b08
Fix build 2023-05-26 00:21:46 +02:00
Kruglov Pavel
1964d1bb7e
Fix comment 2023-05-25 22:30:16 +02:00
avogar
42e1e3ae20 Fix working with secure socket after async connection 2023-05-25 20:24:03 +00:00
Kruglov Pavel
66e111a6aa
Fix tests 2023-05-23 11:52:44 +02:00
Kruglov Pavel
cee6c3914f
Fix build 2023-05-22 21:36:55 +02:00
Kruglov Pavel
8436a093e7
Fix build 2023-05-16 13:36:12 +02:00
Kruglov Pavel
20007504a7
Handle exception in finalize inside WriteBufferFromPocoSocket destructor 2023-05-11 14:16:48 +02:00
avogar
17f5356178 Improve async reading from socket 2023-03-15 12:18:08 +00:00
Alexander Tokmakov
cad1e0b768 fix 2023-02-25 01:18:34 +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
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Maksim Kita
e049f6ada9
Update WriteBufferFromPocoSocket.cpp 2022-02-20 16:59:39 +01:00
Nicolae Vartolomei
1778be516b Always update ProfileEvents (even on exceptions) 2022-02-17 16:29:47 +00:00
avogar
51831afff8 Fix tests 2021-11-11 20:27:23 +03:00
avogar
c521a9131a Small refactoring of WriteBiffer-s 2021-11-11 02:11:18 +03:00
Azat Khuzhin
e5f66fd103 Add socket timeout values into SOCKET_TIMEOUT exception 2021-09-20 09:51:42 +03:00
Alexey Milovidov
c762e2247d More instrumentation for network interaction: add counters for recv/send bytes; add gauges for recvs/sends. 2021-07-04 00:00:50 +03:00
Alexey Milovidov
c1d5713110 Minor changes in code #14254 2021-04-28 06:31:15 +03:00
Azat Khuzhin
9b9e0a9bbc Block all memory tracking limits in destructors 2021-04-14 23:38:42 +03:00
Pavel Kruglov
5f3cb525ee Remove setting same timeouts in secure socket 2021-03-30 10:51:44 +03:00
Pavel Kruglov
1c7f16e0ff Add test and move TimeoutSetter in IO/ 2021-03-03 20:47:27 +03:00
Pavel Kruglov
eef7d8c0bc Fix blocking mode and timeouts in SecureStreamSocket 2021-03-03 16:10:15 +03:00
Azat Khuzhin
98e3a99a88 Do not catch exceptions during final flush in writers destructors
Since this hides real problems, since destructor does final flush and if
it fails, then data will be lost.

One of such examples if MEMORY_LIMIT_EXCEEDED exception, so lock
exceptions from destructors, by using
MemoryTracker::LockExceptionInThread to block these exception, and allow
others (so std::terminate will be called, since this is c++11 with
noexcept for destructors by default).

Here is an example, that leads to empty block in the distributed batch:

    2021.01.21 12:43:18.619739 [ 46468 ] {7bd60d75-ebcb-45d2-874d-260df9a4ddac} <Error> virtual DB::CompressedWriteBuffer::~CompressedWriteBuffer(): Code: 241, e.displayText() = DB::Exception: Memory limit (for user) exceeded: would use 332.07 GiB (attempt to allocate chunk of 4355342 bytes), maximum: 256.00 GiB, Stack trace (when copying this message, always include the lines below):

    0. DB::Exception::Exception<>() @ 0x86f7b88 in /usr/bin/clickhouse
    ...
    4. void DB::PODArrayBase<>::resize<>(unsigned long) @ 0xe9e878d in /usr/bin/clickhouse
    5. DB::CompressedWriteBuffer::nextImpl() @ 0xe9f0296 in /usr/bin/clickhouse
    6. DB::CompressedWriteBuffer::~CompressedWriteBuffer() @ 0xe9f0415 in /usr/bin/clickhouse
    7. DB::DistributedBlockOutputStream::writeToShard() @ 0xf6bed4a in /usr/bin/clickhouse
2021-02-05 01:31:45 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00