Commit Graph

566 Commits

Author SHA1 Message Date
alexey-milovidov
36203721de
Update Connection.cpp 2019-12-06 22:14:27 +03:00
Azat Khuzhin
e4209d6a3f Avoid null dereference after "Unknown packet X from server"
stracktrace:
  ...
  2  DB::WriteBuffer::nextIfAtEnd (this=0x0) at ../dbms/src/IO/WriteBuffer.h:66
  3  DB::writeVarUInt (ostr=..., x=3) at ../dbms/src/IO/VarInt.h:191
  4  DB::Connection::sendCancel (this=0x7f0b7f5e5610) at ../dbms/src/Client/Connection.cpp:444
  5  0x0000561738d0b565 in DB::MultiplexedConnections::sendCancel (this=0x7f0c9b0173e0) at ../dbms/src/Client/MultiplexedConnections.cpp:174
  6  0x00005617387d22df in DB::RemoteBlockInputStream::tryCancel (this=0x7f0cc45f9810, reason=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:352
  7  0x00005617387d2a37 in DB::RemoteBlockInputStream::cancel (this=<optimized out>, kill=false) at ../dbms/src/DataStreams/RemoteBlockInputStream.cpp:121
  8  0x000056173891f10c in DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::cancel (this=0x7f0c370ec168, kill=kill@entry=false)
  9  0x000056173892cfce in DB::UnionBlockInputStream::cancel (kill=false, this=<optimized out>) at ../dbms/src/DataStreams/UnionBlockInputStream.h:99
  10 DB::UnionBlockInputStream::Handler::onException (this=0x7f0c370ec160, exception=...) at ../dbms/src/DataStreams/UnionBlockInputStream.h:240
  11 DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::thread (this=0x7f0c370ec168, thread_group=..., thread_num=<optimized out>)
      at ../dbms/src/DataStreams/ParallelInputsProcessor.h:217

And in onException frame there is:
  (gdb) p ((DB::Exception *)exception._M_exception_object)._msg._M_dataplus._M_p
  $6 = (...) 0x7f0c9b1e7a40 "Unknown packet 9 from server HOSTNAME:PORT"

And on "Unknown packet" there is disconnect() before, see default in
switch statement at Connection::receivePacket().
2019-12-06 21:55:17 +03:00
Vitaly Baranov
681f03c625
Merge pull request #7653 from vitlibar/skip-unknown-settings-with-warnings
Skip unknown settings with warnings.
2019-11-18 13:50:52 +03:00
Vitaly Baranov
f3d72b9ec1 Skip unknown settings with warnings. 2019-11-17 03:51:58 +03:00
Amos Bird
755904f51f
better INCLUDE_DEBUG_HELPERS 2019-11-16 00:34:43 +08:00
Amos Bird
295864e6e0
better scalar query 2019-10-23 21:37:54 +08:00
Alexander Kuzmenkov
8a1d57bddb Include PODArray.h into fewer files. 2019-10-11 14:28:16 +03:00
Amos Bird
dadc613072 Get rid of malloc symbols in libcommon (#7134) 2019-09-30 14:58:32 +03:00
Ivan
e5a5091556
Revert "Get rid of malloc symbols in libcommon (#7065)" (#7131)
This reverts commit 4cb53093a0.
2019-09-27 16:16:53 +03:00
Amos Bird
4cb53093a0 Get rid of malloc symbols in libcommon (#7065) 2019-09-27 15:19:26 +03:00
alexey-milovidov
25de2e12a2
Merge pull request #6399 from Enmk/replica_recovery_interval
Improvements for failover of Distributed queries
2019-09-07 03:21:30 +03:00
alexey-milovidov
5f33fd946f
Merge pull request #6711 from dimarub2000/exception_while_insert
Exception check added in client when sending insertion data.
2019-09-03 21:47:48 +03:00
Dmitry Rubashkin
d2b9990a2a Unexpected packets received in a better way now. 2019-09-03 12:36:16 +03:00
Vasily Nemkov
84fc4ba4c8 Replica recovery fixes
* Added a limit on how many errors can replica accumulate
* Decreased default error halving time to 60 seconds
* Made both configurable via settings
* Showing errors count and estimated recovery time for each replica in system.clusters
2019-09-02 17:26:25 +03:00
Alexey Milovidov
b6a0dba2df Added a setting "connection_pool_max_wait_ms" 2019-08-28 18:27:26 +03:00
dimarub2000
086dd815ac T_test.h added, some fixes 2019-08-21 11:53:41 +03:00
Alexey Milovidov
886e8ea0d4 Merge branch 'master' into pvs-studio-fixes-4 2019-07-08 19:58:42 +03:00
Alexey Milovidov
4752dae9bb Allowed unresolvable addresses in cluster configuration #5714 2019-07-08 04:43:41 +03:00
Alexey Milovidov
bba2641bd0 A few fixes for PVS-Studio 2019-07-08 02:25:15 +03:00
Konstantin Podshumok
a3d2310d6f add timeouts to multiplexed connections 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
eb31345224 add timeouts to ConnectionPoolWithFailover and use max_tries from settings 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
d18fd5f10b timeouts from ConnectionPool members as they are intended to live longer than timeouts state 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
6836bf6733 connection: make sure connection timeouts are applied during sendQuery 2019-06-02 12:43:20 +03:00
Konstantin Podshumok
94b2bf5551 move timeouts from members to parameters in Connection
maybe it is better to provide some `set_timeouts` method?
2019-06-02 12:43:20 +03:00
Ivan Lezhankin
0821d62516 Merge ITableDeclaration into IStorage.
Also a couple of massive include-refactorings with better forwarding
2019-05-17 17:34:25 +03:00
Vitaly Baranov
8277e9d8f1 Refactoring of Settings based on new template class SettingsCollection.
Add new class SettingsConstraints.
2019-04-26 19:11:05 +03:00
proller
ba4687e110
Cmake: dont use LINK_MODE (but use BUILD_SHARED_LIBS) (#5091) 2019-04-24 12:06:28 +03:00
alesapin
1c899edc27
Update ConnectionPoolWithFailover.cpp 2019-04-18 18:53:39 +03:00
Nicolae Vartolomei
c2ec23c953
Add FIRST_OR_RANDOM Load Balancing policy
For cross-replication topology setups load_balancing=in_order works best
as nodes handle equal amount of load and usually they hit only 1/n of
data (n = number of replicas), which makes page cache usage more
efficient.

The problem is when one node of the shard goes down. If one replica goes
down, the next one in config will handle twice the usual load while
remaining ones will handle usual traffic.

Closes #4820.
2019-04-15 23:31:40 +01:00
Alexey Milovidov
36d016d331 Added [[noreturn]] attributes for functions that throw unconditionally 2019-04-10 23:27:14 +03:00
proller
fce9db12b9 Move Interpreters/Settings* -> Core/Settings* 2019-03-22 15:08:30 +03:00
proller
78e0b1af5e
Fix compression level detection when network_compression_method in lowercase (#4706) 2019-03-18 17:59:07 +03:00
alexey-milovidov
4f2b35cb10
Merge pull request #4215 from abyss7/CLICKHOUSE-3729
Report progress from server-side to keep client connections alive
2019-02-11 02:07:57 +03:00
Alexey Milovidov
ba3cb83a84 Removed duplicate includes 2019-02-10 20:12:22 +03:00
Ivan Lezhankin
994926e568 Merge remote-tracking branch 'upstream/master' into CLICKHOUSE-3729 2019-02-04 20:13:50 +03:00
Alexey Milovidov
ef50601b5c Removed non-breaking spaces: find dbms -name '*.h' -or -name '*.cpp' | xargs grep -l $'\xc2\xa0' | xargs sed -i -r -e 's/\xc2\xa0/ /g' 2019-01-25 02:01:56 +03:00
Alexey Milovidov
5ccc42fd96 Revert "Removed non-breaking spaces: find dbms -name '*.h' -or -name '*.cpp' | xargs grep -l $'\xc2\xa0' | xargs sed -i -r -e 's/\xc2\xa0/ /'"
This reverts commit a28f0acf09.
2019-01-25 01:59:45 +03:00
Alexey Milovidov
a28f0acf09 Removed non-breaking spaces: find dbms -name '*.h' -or -name '*.cpp' | xargs grep -l $'\xc2\xa0' | xargs sed -i -r -e 's/\xc2\xa0/ /' 2019-01-24 22:49:36 +03:00
Alexey Milovidov
1d4701b0bc Added some warnings from clang's -Weverything 2019-01-04 15:10:00 +03:00
Alexey Milovidov
e33e5150b7 Miscellaneous [#CLICKHOUSE-2] 2019-01-02 09:44:36 +03:00
proller
300bbdfb43 Fix cyclic lib depend ppart 2: clean 2018-12-28 21:15:26 +03:00
alesapin
6f7333840a Move header with compression info to another place 2018-12-21 16:25:39 +03:00
alesapin
7c11455bd3 Remove compression settings 2018-12-21 15:17:30 +03:00
chertus
60dc8fcac2 fixes for review CLICKHOUSE-3578 2018-12-06 20:20:17 +03:00
chertus
3db00b7b98 Merge branch 'master' into issue-3578 2018-12-05 14:43:14 +03:00
chertus
a71d03737c send defaults via serialized ColumnsDescription CLICKHOUSE-3578 2018-12-04 23:03:04 +03:00
Alexey Milovidov
52fea90a86 Removed useless code [#CLICKHOUSE-2] 2018-11-28 17:33:40 +03:00
proller
f1791e94e2
Do not write preprocessed configs to /etc/ (#2443) 2018-11-27 19:11:46 +03:00
Alexey Milovidov
e793a27cc3 Restored old test util #3665 2018-11-26 16:57:54 +03:00
Alexey Milovidov
c77930fe30 Whitespaces [#CLICKHOUSE-2] 2018-11-26 03:56:50 +03:00