Azat Khuzhin
4230f04f72
Fix UB in LimitReadBuffer in case of unexpected EOF
...
Fixes the following possible assertions:
- ./src/IO/ReadBuffer.h:58: bool DB::ReadBuffer::next(): Assertion `!hasPendingData()' failed.
- ./src/IO/LimitReadBuffer.cpp:17: virtual bool DB::LimitReadBuffer::nextImpl(): Assertion `position() >= in->position()' failed.
Fixes: 02151_http_s_structure_set_eof
2021-12-21 08:38:41 +03:00
Azat Khuzhin
08ced87880
Rework MultipartReadBuffer::skipToNextBoundary()
...
As suggested by @vitlibar
2021-12-21 08:38:41 +03:00
Azat Khuzhin
d7c7a91f66
Check that at least one boundary exist in HTMLForm::readMultipart()
2021-12-21 08:38:41 +03:00
Azat Khuzhin
4dfa9324d1
Check for EOF in MultipartReadBuffer::skipToNextBoundary()
...
Otherwise you may hit internal assertion when client goes away:
clickhouse-server: ./src/Server/HTTP/HTMLForm.cpp:245: bool DB::HTMLForm::MultipartReadBuffer::skipToNextBoundary(): Assertion `boundary_hit' failed.
Fixes: 02151_http_s_structure_set_eof
2021-12-21 08:38:41 +03:00
Azat Khuzhin
7193bb9579
Add a test with EOF during creating set over HTTP
...
v2: update some comments
2021-12-21 08:38:41 +03:00
JackyWoo
7a19570853
keeper handler should remove operation when response sent
2021-12-21 11:43:14 +08:00
kssenii
30996b2448
Fix
2021-12-21 01:19:51 +03:00
N. Kolotov
66eb6bf560
Added test to check client option --echo.
2021-12-21 00:59:35 +03:00
alexey-milovidov
04fb8aeaa5
Merge pull request #32946 from antonio2368/feature/hints-for-settings
...
Hints for invalid settings in query and HTTP requests
2021-12-21 00:52:42 +03:00
kssenii
175ad8a989
Fix
2021-12-21 00:20:08 +03:00
Kseniia Sumarokova
d51b101244
Update test.py
2021-12-21 00:06:24 +03:00
Maksim Kita
26ea47982e
Merge pull request #32965 from save-my-heart/fix-data-part-modification-time
...
fix wrong modification_time after move part
2021-12-21 00:05:27 +03:00
kssenii
a064410a39
Fix
2021-12-21 00:03:55 +03:00
Kseniia Sumarokova
2ac7897470
Merge pull request #32841 from lingtaolf/feature/add-clickhouse-client-hints
...
Add clickhouse client hints
2021-12-20 23:48:50 +03:00
Azat Khuzhin
a367326abb
Mark 02152_http_external_tables_memory_tracking as no-tsan
2021-12-20 23:30:44 +03:00
Vitaly Baranov
be44743ebe
Don't throw in unexceptional cases: update().
2021-12-20 23:10:46 +03:00
Vitaly Baranov
ed94c640fa
Don't throw in unexceptional cases: remove().
2021-12-20 23:10:43 +03:00
Vitaly Baranov
551fcc55e8
Don't throw in unexceptional cases: insert().
2021-12-20 23:09:55 +03:00
Alexey
5a63f311fc
en edits
2021-12-20 20:05:55 +00:00
alesapin
e194b38096
Followup
2021-12-20 22:54:04 +03:00
alesapin
a962cc67da
Fix deps
2021-12-20 22:45:30 +03:00
alesapin
62eb504029
Trying to add woboq
2021-12-20 22:43:37 +03:00
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
Raúl Marín
36164a72c2
Missing include
2021-12-20 18:17:10 +01:00
Raúl Marín
c42f03beb6
Use ClickHouse-Extras for boost·
2021-12-20 18:01:28 +01: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
Raúl Marín
b553e51969
Merge remote-tracking branch 'blessed/master' into libcxx13_take2
2021-12-20 17:47:57 +01: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
avogar
ba6a513db0
Fix tuple output in CSV format
2021-12-20 19:27:09 +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
Alexey
79086764ff
new interserver_http_credentials description variant
2021-12-20 15:52:41 +00: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
Nikita Mikhaylov
d9c13900f5
Fix build + style
2021-12-20 14:31:56 +00: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