Commit Graph

79820 Commits

Author SHA1 Message Date
Antonio Andelic
4eae5ce00e Fix http request check 2021-12-20 20:39:31 +01:00
mergify[bot]
e21c04ff9c
Merge branch 'master' into fix-data-part-modification-time 2021-12-20 18:58:47 +00:00
Azat Khuzhin
6afcb1d1c8 Replace uuidgen(1) with generateUUID() function in 02152_http_external_tables_memory_tracking
uuidgen (from e2fsprogs) does not exists on CI images, so use internal
clickhouse function.
2021-12-20 21:43:26 +03:00
Vitaly Baranov
8c4e689da3 Don't throw in unexceptional cases: read() & readName() 2021-12-20 21:26:35 +03:00
Vitaly Baranov
a87f0b483e Replace function IAccessStorage::canInsert() with isReadOnly(). 2021-12-20 21:26:35 +03:00
Vitaly Baranov
6721060649 Rename function IAccessStorage::login() -> IAccessStorage::authenticate().
Remove functions IAccessStorage::hasSubscriptionImpl() and IAccessStorage::existsImpl().
2021-12-20 21:26:27 +03:00
Vitaly Baranov
c01d0f95c3 Remove the function IAccessStorage::getIDOfLoggedUser() and move its functionality to login(AlwaysAllowCredentials). 2021-12-20 21:24:38 +03:00
Azat Khuzhin
a9f80dd705 Fix Context leak in case of cancel_http_readonly_queries_on_client_close
To handle cancel_http_readonly_queries_on_client_close=true context
attaches progress callback with holding a copy of the current context,
and this creates recursive context reference and so shared_ptr will be
never released, [1] contains simplest example.

One example of a memory leak, external tables passed with HTTP query
(s_structure + file upload), since they are stored in the context, and
can occupate enough memory to make it visible to user.

Note, that the lifetime of the Context should be fine, since callback
can be called only when query is executed.

  [1]: Example of recursive reference

       ```c
       #include <memory>
       #include <functional>
       #include <cassert>

       bool released = true;

       class Context : public std::enable_shared_from_this<Context>
       {
           using Func = std::function<void()>;
           Func func;

       public:
           Context()  { released = false; }
           ~Context() { released = true; }
           Context(const Context & context) = delete;

           void addCallback(Func func_)
           {
               func = func_;
           }
       };

       int main()
       {
           {
               auto context = std::make_shared<Context>();
               context->addCallback([context]() {});
           }
           assert(released == true);
       }
       ```
2021-12-20 21:05:38 +03:00
Azat Khuzhin
dd8c64e380 Set QueryScope earlier for HTTP queries 2021-12-20 21:05:38 +03:00
Azat Khuzhin
095f558ba1 Cover memory tracking of external tables via HTTP queries
Thanks to @den-crane
2021-12-20 21:05:37 +03:00
Nikolai Kochetov
35883e0dae
Merge pull request #32979 from ClickHouse/decrease-some-s3-log-level
Decrease log level for some s3 messages.
2021-12-20 20:56:22 +03:00
Maksim Kita
dd0d3de050
Merge pull request #32970 from kitaisreal/loops-remove-postfix-increment
Loops remove postfix increment
2021-12-20 19:51:07 +03:00
Maksim Kita
daa23a2827
Merge pull request #32973 from kitaisreal/short-circuit-throw-if-support
Short circuit evaluation function throwIf support
2021-12-20 19:50:53 +03:00
Vitaly Baranov
e61d3eef0c
Merge pull request #32747 from vitlibar/improve-grpc-compression
Improve gRPC compression support
2021-12-20 19:44:58 +03:00
Antonio Andelic
e65df85412 Use -F flag for tests 2021-12-20 17:05:16 +01:00
Antonio Andelic
bc52758e4d Explicitly default move/copy constructors 2021-12-20 17:05:08 +01:00
Antonio Andelic
ef57b759e0 Add stateless tests for setting hints 2021-12-20 16:57:09 +01:00
Antonio Andelic
25f88356e4 Add hints for SET query and HTTP request param settings 2021-12-20 16:57:09 +01:00
Nikolai Kochetov
7dea7b7f76 Decrease log level for some s3 messages. 2021-12-20 18:18:54 +03:00
Kseniia Sumarokova
a5f28e51e5
Try fix style check 2021-12-20 18:09:20 +03:00
Maksim Kita
02b6ad52ef FunctionThrowIf fixed exception 2021-12-20 16:55:15 +03:00
Maksim Kita
f9b585fcdf
Merge pull request #32822 from den-crane/test/summap_nullable
test for summap nullable(0)
2021-12-20 16:50:45 +03:00
Maksim Kita
ebff389701
Merge pull request #32972 from kitaisreal/containers-iteration-fix-erase
Containers iteration fix erase
2021-12-20 16:47:19 +03:00
Nikolai Kochetov
9cc1933c54
Merge pull request #32581 from andrc1901/andrc1901-DOCSUP-18084
DOCSUP-18084: Edit and translate to Russian
2021-12-20 16:39:35 +03:00
avogar
e31c18e9f8 Fix hdfs url check 2021-12-20 16:09:48 +03:00
Maksim Kita
60d4295d8a FunctionThrowIf added comment 2021-12-20 16:00:43 +03:00
mergify[bot]
c3a4e0ddcb
Merge branch 'master' into andrc1901-DOCSUP-18084 2021-12-20 13:00:43 +00:00
Maksim Kita
51477adf1b Updated additional cases 2021-12-20 15:55:07 +03:00
Nikolai Kochetov
2e62f086a1
Merge pull request #32751 from ClickHouse/fix-32668
Apply some more optimizations to NO_QUERY ast.
2021-12-20 15:47:25 +03:00
Kruglov Pavel
abbab7ff87
Merge pull request #32929 from kreuzerkrieg/get_ORC_right
Stop reading incomplete stripes and skip rows.
2021-12-20 15:31:48 +03:00
alesapin
5958cac72c
Merge pull request #32493 from azat/fix-02050_client_profile_events
Fix 02050_client_profile_events flakiness
2021-12-20 15:02:02 +03:00
alesapin
830f1a2e94
Merge pull request #32967 from ClickHouse/sync_release_branches_1
Sync release CI branches in master
2021-12-20 14:51:55 +03:00
Maksim Kita
20e4ce3314 Short circuit evaluation function throwIf support 2021-12-20 14:49:05 +03:00
alesapin
6e15ff7d31 Fix envs 2021-12-20 13:48:15 +03:00
Maksim Kita
3feab5a975 Containers iteration fix erase 2021-12-20 13:42:31 +03:00
Maksim Kita
51826c14a0 Dictionaries added Date32 type support 2021-12-20 13:39:07 +03:00
Maksim Kita
7785eac384 Loops remove postfix increment 2021-12-20 13:32:13 +03:00
Kseniia Sumarokova
967738ff8f
Merge pull request #32749 from kssenii/table-override-pg
Support Table Override clause for MaterializedPostgreSQL too
2021-12-20 13:11:47 +03:00
Maksim Kita
a72637b0f7
Merge pull request #32966 from wangxinalex/patch-1
Update external-dicts-dict-polygon.md
2021-12-20 13:03:21 +03:00
Maksim Kita
2eb9b3118e
Merge pull request #32805 from kitaisreal/cache-dictionary-dictionary-source-access-race-fix
CacheDictionary dictionary source access race fix
2021-12-20 12:50:16 +03:00
Amos Bird
f56e3942e3
Hermetic shared build 2021-12-20 16:59:42 +08:00
alesapin
0e6b1b0ec0 Sync release branches in master 2021-12-20 11:58:52 +03:00
Xin Wang
3edb2ca806
Update external-dicts-dict-polygon.md
fix a typo `tne` -> `the`
2021-12-20 16:32:38 +08:00
save-my-heart
1abe978455 fix wrong modification_time after move part 2021-12-20 16:29:06 +08:00
凌涛
0efc01be05 add test 2021-12-20 13:53:08 +08:00
kssenii
965e2bfb21 Fix 2021-12-20 08:43:07 +03:00
alexey-milovidov
4a67b59cd6
Merge pull request #32960 from bharatnc/ncb/fixes
simplify looping in S2 functions
2021-12-20 08:35:40 +03:00
bharatnc
b9787f730e use prefix increment for rows 2021-12-19 20:32:52 -08:00
bharatnc
15c555c161 simplify looping in S2 functions
Previously replaced range based for loops in H3 functions with simple
for loops based on review. Similarly doing the same for the S2 functions
also.
2021-12-19 20:00:28 -08:00
alexey-milovidov
b24d57db1c
Merge pull request #32954 from den-crane/test/base64encode_trailing_bytes1
test for base64encode_trailing_bytes #31797
2021-12-20 04:42:56 +03:00