Commit Graph

48 Commits

Author SHA1 Message Date
Alexey Milovidov
438f0f971b Fix the issue with async Distributed INSERTs and network_compression_method #18741 2021-01-06 03:24:42 +03:00
filimonov
8d9ad60afa
Decrease verbosity of disconnecting clients
Right now they go to error log.
2020-12-11 11:51:48 +01:00
Alexey Milovidov
3e2447391b Support for PROXY protocol 2020-12-03 00:05:51 +03:00
Alexander Kuzmenkov
6cb378e072 cleanup 2020-11-19 18:52:11 +03:00
Alexander Kuzmenkov
b16c5a1748 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-17 22:54:54 +03:00
Alexander Tokmakov
b94cc5c4e5 remove more stringstreams 2020-11-10 21:22:26 +03:00
Alexander Kuzmenkov
26229ed231 tmp spans for threads
(doesn't compile because of json metadata changes)
2020-11-09 18:07:38 +03:00
Alexey Milovidov
fd84d16387 Fix "server failed to start" error 2020-11-07 03:14:53 +03:00
Alexander Kuzmenkov
5a70e26c70 Merge remote-tracking branch 'origin/master' into HEAD 2020-10-26 19:21:13 +03:00
Alexey Milovidov
74558a4e27 Better diagnostics when client has dropped connection 2020-10-24 06:41:47 +03:00
Alexander Kuzmenkov
41ac15a71c fix initial query id 2020-10-20 00:26:10 +03:00
Alexander Kuzmenkov
6200433e12 Merge origin/master into tmp (using imerge) 2020-10-12 21:15:31 +03:00
Nikolai Kochetov
190fd88af9
Merge pull request #15785 from amosbird/e1
Code refactor.
2020-10-12 00:36:36 +03:00
Alexey Milovidov
7502fad77c Change level of some log messages 2020-10-10 20:47:34 +03:00
Amos Bird
8e0862a0c3
BlockIO can be empty. 2020-10-10 23:25:50 +08:00
Amos Bird
dbc14655fc
Code refactoring. 2020-10-10 18:22:33 +08:00
Alexander Kuzmenkov
dde4cf70e1 Merge remote-tracking branch 'origin/master' into HEAD 2020-09-22 14:03:59 +03:00
Alexander Kuzmenkov
7b64ca33b1 Merge remote-tracking branch 'origin/master' into tmp 2020-09-22 14:02:20 +03:00
Alexander Kuzmenkov
bfc3be9e43 Merge remote-tracking branch 'origin/aku/tcp-versio' into tmp 2020-09-22 14:02:15 +03:00
Vitaly Baranov
02acedd6a3 Use initial_address for quota calculation when the interserver-secret mode enabled. 2020-09-19 01:04:25 +03:00
Alexander Kuzmenkov
fd33fa7f39 fixup 2020-09-17 17:55:41 +03:00
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Alexander Kuzmenkov
a374541214 straighten the protocol version 2020-09-17 15:15:05 +03:00
Azat Khuzhin
785d1b2a75 OpenSSLHelpers cleanup
Add few more specializations for encodeSHA256():
- std::string encodeSHA256(const std::string_view &);
- std::string encodeSHA256(const void *, size_t);
- void encodeSHA256(const void *, size_t, unsigned char *);
2020-09-15 01:36:28 +03:00
Azat Khuzhin
0159c74f21 Secure inter-cluster query execution (with initial_user as current query user) [v3]
Add inter-server cluster secret, it is used for Distributed queries
inside cluster, you can configure in the configuration file:

  <remote_servers>
      <logs>
          <shard>
              <secret>foobar</secret> <!-- empty -- works as before -->
              ...
          </shard>
      </logs>
  </remote_servers>

And this will allow clickhouse to make sure that the query was not
faked, and was issued from the node that knows the secret. And since
trust appeared it can use initial_user for query execution, this will
apply correct *_for_user (since with inter-server secret enabled, the
query will be executed from the same user on the shards as on initator,
unlike "default" user w/o it).

v2: Change user to the initial_user for Distributed queries if secret match
v3: Add Protocol::Cluster package
v4: Drop Protocol::Cluster and use plain Protocol::Hello + user marker
v5: Do not use user from Hello for cluster-secure (superfluous)
2020-09-15 01:36:28 +03:00
Azat Khuzhin
ec9d7745f3 Break the query loop on UNEXPECTED_PACKET_FROM_CLIENT 2020-09-15 01:36:28 +03:00
Azat Khuzhin
d53bbd3394 Not only send the exception to the client but also log it
Otherwise there will be only tricky "Unknown packet" exception after
exception during handling INSERT queries.
2020-09-15 01:36:28 +03:00
Alexander Kuzmenkov
c62bf555d2 Merge origin/master into tmp (using imerge) 2020-09-08 16:26:38 +03:00
Alexander Kuzmenkov
d0a9926e7d fixes and some docs 2020-09-08 16:19:27 +03:00
alesapin
10c7a6c45e
Add ability to specify Default codec for columns (#14049)
* Add ability to specify DefaultCompression codec which correspond to settings specified in config.xml

* Fix style

* Rename DefaultCompression to simple Default

* Fix compression codec

* Better codec description representation

* Less strange code and one method

* Fix delta
2020-08-28 20:40:45 +03:00
Alexander Kuzmenkov
4612794678 opentelemetry context propagation 2020-08-28 04:21:08 +03:00
Vitaly Baranov
56665a15f7 Rework and rename the template class SettingsCollection => BaseSettings. 2020-07-31 20:54:18 +03:00
alexey-milovidov
b5e87f5b25
Revert "Abort on std::out_of_range in debug builds" 2020-07-24 18:12:03 +03:00
Azat Khuzhin
eaaa4543f4 Abort on std::out_of_range in debug builds
This helps notice them in tests, same as:
- std::logic_error
- LOGICAL_ERROR
2020-07-23 11:36:12 +03:00
Alexander Kuzmenkov
a4a23673cc fixup 2020-07-17 17:25:13 +03:00
Alexander Kuzmenkov
4089f761e1 fix one out_of_range 2020-07-17 17:20:33 +03:00
Alexander Kuzmenkov
9d728d60d0 Abort on std::logic_error in debug builds
This helps notice them in tests, same as assert() and LOGICAL_ERROR.
2020-07-15 15:08:01 +03:00
alesapin
4185fe9975 Merge branch 'master' into atomic_metadata5 2020-06-23 11:13:05 +03:00
Alexey Milovidov
7ba25bd799 Make it work 2020-06-20 14:17:15 +03:00
alesapin
dffdece350 getColumns in StorageInMemoryMetadta (only compilable) 2020-06-17 19:39:58 +03:00
alesapin
1ddeb3d149 Buildable getSampleBlock in StorageInMemoryMetadata 2020-06-16 18:51:29 +03:00
alesapin
36ba0192df Metadata in read and write methods of IStorage 2020-06-15 22:08:58 +03:00
Alexander Kuzmenkov
435f53e05a Improve error messages
Also support fmt for exception messages, the same way we use it in
logging macros.
2020-06-04 20:50:29 +03:00
tavplubix
a4e40fb5f2
Merge pull request #11269 from ClickHouse/add_context_to_idatabase_methods
Add context to IDatabase methods
2020-05-29 21:15:35 +03:00
Alexey Milovidov
23d7947549 Fix constraints for DEFAULT fields; fix constraints for temporary tables; improve performance of INSERT for small blocks 2020-05-29 05:08:48 +03:00
Alexander Tokmakov
c071e0a473 add context to DatabaseCatalog methods 2020-05-29 02:01:18 +03:00
Nikolai Kochetov
2dcee3db5c Merge branch 'master' into remove-experimental-use-processors-flag-3 2020-05-27 21:25:34 +03:00
Ivan
5b858de374
Split programs/server into actual program and library (#11186)
* Split programs/server into actual program and library
2020-05-27 20:52:52 +03:00