alesapin
45b0894252
Some fixes
2020-11-09 20:50:39 +03:00
a.palagashvili
6286775031
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into issue-8828
2020-11-09 19:53:20 +03:00
alesapin
4e846d2197
Merge branch 'master' into add_separate_pool_for_fetches
2020-11-09 10:00:21 +03:00
alesapin
456b0b94c1
Remove some debug
2020-11-09 09:54:35 +03:00
alexey-milovidov
2d427eb1e8
Merge pull request #16496 from ClickHouse/register-formats
...
Fix inconsistency in FormatFactory
2020-11-08 14:27:33 +03:00
Alexey Milovidov
dba57529f8
Merge branch 'master' of github.com:yandex/ClickHouse into fix-stringstream
2020-11-07 22:03:38 +03:00
Alexey Milovidov
941ee1a214
Fix error
2020-11-07 22:02:22 +03:00
Alexey Milovidov
80fb30c06d
Fix error
2020-11-07 19:09:15 +03:00
Alexey Milovidov
8b8383d375
Fix error
2020-11-07 19:08:19 +03:00
Alexey Milovidov
c3973123bd
Fix error
2020-11-07 19:03:23 +03:00
a.palagashvili
268f289bd1
resolved conflict
2020-11-07 16:36:38 +03:00
alexey-milovidov
494c188559
Merge pull request #16757 from ClickHouse/tavplubix-patch-3
...
Get rid of possible memory allocation in ThreadPool::worker(...)
2020-11-07 13:40:31 +03:00
Alexey Milovidov
fd84d16387
Fix "server failed to start" error
2020-11-07 03:14:53 +03:00
Alexey Milovidov
57de99bcd9
More simple
2020-11-06 20:46:43 +03:00
Alexey Milovidov
ad52fceb83
Fix bad code in SmallObjectPool
2020-11-06 20:34:14 +03:00
tavplubix
044f143463
Update ThreadPool.cpp
2020-11-06 18:53:33 +03:00
alexey-milovidov
6d5e852356
Merge pull request #16677 from ClickHouse/field-infinite-convert-to-int
...
Fix UBSan report when trying to convert infinite floating point number to integer
2020-11-05 23:20:25 +03:00
Alexey Milovidov
b56486510f
Improve Arcadia
2020-11-05 12:55:01 +03:00
Alexey Milovidov
65aa226bcd
Fix test
2020-11-05 12:26:51 +03:00
alesapin
a9529e8d65
Bad code but all events
2020-11-04 21:54:55 +03:00
alesapin
e2bce14aed
Merge branch 'master' into complete_zk_api
2020-11-04 20:37:30 +03:00
Alexey Milovidov
22954cc123
Fix UBSan report when trying to convert infinite floating point number to integer
2020-11-04 19:48:36 +03:00
a.palagashvili
ceda5cb9c5
fix codestyle, resolvec conflict
2020-11-04 19:47:04 +03:00
Alexey Milovidov
ff8f80b6b6
Remove old file
2020-11-04 13:34:47 +03:00
Alexey Milovidov
f7c77b4a25
Fix unit tests
2020-11-04 13:14:23 +03:00
alexey-milovidov
4fede5b008
Merge pull request #16438 from azat/errorCode-v2
...
Add errorCodeToName() and system.errors
2020-11-04 12:40:47 +03:00
alexey-milovidov
973c1d7983
Merge pull request #16529 from azat/log_queries_min_time
...
Add log_queries_min_query_duration_ms
2020-11-04 01:47:18 +03:00
alexey-milovidov
8a3f38f332
Merge branch 'master' into errorCode-v2
2020-11-04 01:40:41 +03:00
alesapin
598532b582
Remove strange method
2020-11-03 18:01:56 +03:00
alesapin
5700e5e46d
Fix response serialization
2020-11-03 17:57:40 +03:00
alesapin
93c2ad6034
Something work
2020-11-03 17:49:30 +03:00
alesapin
a02b4322b6
Merge branch 'master' into complete_zk_api
2020-11-03 13:13:07 +03:00
Alexander Kuzmenkov
f10a5207f4
Merge pull request #16601 from ClickHouse/ban_aggregate_function_in_primary_key
...
Restrict to use non-comparable types in primary key
2020-11-02 23:27:46 +03:00
Azat Khuzhin
3be8a56f5c
Add log_queries_min_query_duration_ms
...
Only queries slower then the value of this setting will go to system.query_log,
i.e. something like slow_query_log in mysql.
v2: log_queries_min_time renamed to log_queries_min_query_duration_ms
v3: add current_database into system.query_thread_log
v4: rewrite test using current_database
v5: fix query_duration_ms in system.query_thread_log
2020-11-02 21:34:54 +03:00
alexey-milovidov
bfa0ddcdfe
Merge pull request #16596 from ClickHouse/strange-cpp
...
Add strange C++ code that actually does not change anything
2020-11-02 20:02:28 +03:00
a.palagashvili
805bfd286c
resolved git modules
2020-11-02 15:16:49 +03:00
alesapin
f3b3025719
Ban non comparable types in primary key
2020-11-02 14:39:27 +03:00
Alexey Milovidov
67daa37a7f
Add strange C++ code that actually does not change anything
2020-11-02 13:42:47 +03:00
alesapin
8b0d9fbc07
Merge branch 'no_background_pool_no_more' into add_separate_pool_for_fetches
2020-11-02 10:54:09 +03:00
a.palagashvili
be2b002ff4
fixed cmake for building, added test for compression method, added basic code for encoding
2020-11-01 21:40:05 +03:00
Azat Khuzhin
5363c62fc5
Fix overflow check in ErrorCodes
2020-11-01 09:00:19 +03:00
Azat Khuzhin
c8f756707f
Swap name and value in ErrorCodes definition
2020-10-31 11:32:44 +03:00
Azat Khuzhin
fff6b5549e
Hide getCurrentTimeNanoseconds() to avoid possible errors
...
To avoid further errors like in:
- c0e15ba348
("Fix RealTimeMicroseconds ProfileEvents")
- c856d02e0f4a519cd2a29ffbe1135196de0bc65a ("Fix query_thread_log.query_duration_ms unit")
2020-10-31 11:15:27 +03:00
alexey-milovidov
022648a154
Merge pull request #16558 from azat/query_thread_log_current_database
...
Add current_database into query_thread_log
2020-10-31 06:36:10 +03:00
alesapin
1fc7633289
Heartbeats working
2020-10-30 22:57:30 +03:00
Azat Khuzhin
5bab7a5bc7
Add current_database into query_thread_log
2020-10-30 21:16:10 +03:00
alesapin
c2525ef211
Server and client pinging each other
2020-10-30 17:16:47 +03:00
Azat Khuzhin
3661769e1b
Remove some absolute changes for errorCodeToName/system.errors
2020-10-30 09:04:22 +03:00
Azat Khuzhin
0cd79de632
Eliminate extra strlen() in errorCodeToName()
2020-10-29 21:53:09 +03:00
Azat Khuzhin
cb50886ef1
Fix ErrorCodes increment on error
2020-10-29 21:24:52 +03:00
Azat Khuzhin
04bff595d3
Make check-style happy (by not using DB::ErrorCodes:: in comments)
2020-10-29 21:10:20 +03:00
Azat Khuzhin
7e79769ae4
Fix readability-inconsistent-declaration-parameter-name in ErrorCodes.h
2020-10-29 21:08:09 +03:00
Maxim Akhmedov
3627fabfb9
Remove -g0 form Arcadia build settings.
2020-10-29 17:37:23 +03:00
alesapin
5e2a3d12d7
Split requests and responses part from zookeeper
2020-10-29 17:25:44 +03:00
Azat Khuzhin
b42f77a791
Covert error codes list to lookup table and drop generation of them.
2020-10-29 10:55:41 +03:00
Azat Khuzhin
b2e2322895
Add system.errors table
...
Contains error codes with number of times they have been triggered.
Columns:
- `name` ([String](../../sql-reference/data-types/string.md)) — name of the error (`errorCodeToName`).
- `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — code number of the error.
- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) - number of times this error has been happened.
**Example**
``` sql
SELECT *
FROM system.errors
WHERE value > 0
ORDER BY code ASC
LIMIT 1
┌─name─────────────┬─code─┬─value─┐
│ CANNOT_OPEN_FILE │ 76 │ 1 │
└──────────────────┴──────┴───────┘
2020-10-29 10:55:38 +03:00
alesapin
0931658c2f
Merge branch 'master' into add_separate_pool_for_fetches
2020-10-28 14:20:56 +03:00
alesapin
8a6be1602b
Merge pull request #16364 from ClickHouse/fix_uuid_mapping_exists
...
Minor improvements in DatabaseCatalog
2020-10-28 10:54:39 +03:00
Mikhail Filimonov
41971e073a
Fix typos reported by codespell
2020-10-27 12:04:03 +01:00
alesapin
77d350aaeb
Bigger setting value
2020-10-26 14:23:59 +03:00
Alexander Tokmakov
f8f2d62d70
minor improvements in DatabaseCatalog
2020-10-25 20:27:21 +03:00
alexey-milovidov
e00f6c4a0d
Merge branch 'master' into total_memory_tracker-by-default
2020-10-24 21:17:53 +03:00
Azat Khuzhin
114ea9b1eb
Fix accounting for new/delete from different threads for VariableContext::Thread
...
MemoryTracker assumes that for VariableContext::Thread new/delete may be
called from different threads, hence the amount of memory can go
negative.
However the MemoryTracker is nested, so even if the negative amount is
allowed for VariableContext::Thread it does not allowed for anything
upper, and hence the MemoryTracking will not be decremented properly.
Fix this, by passing initial size to the parent free.
This should fix memory drift for HTTP queries.
2020-10-23 21:07:52 +03:00
Azat Khuzhin
72d7b6117e
Use total_memory_tracker when there is no other MemoryTracker object.
...
This should significantly reduce the MemoryTracking drift, test shows
that there is 0 drift after query storm (100 queries, via http/tcp/tcp
in one session).
TL;DR;
To track memory, clickhouse creates memory tracker object for each
thread **explicitly**, but until it is not created the memory
allocations are not under account.
There should not be lot of allocations w/o memory tracker, since most of
the time it is created early enough, but even this maybe enough to
trigger some problems.
Plus sometimes it is not possible to create it, for example some 3d
party library does not allow to do this explicitly:
- for example before #15740 allocations from librdkafka threads,
- or even worse, poco threads, they don't have any routines to do this.
This won't be a problem for `MemoryTracking` metric if the deallocation
will be done from the same thread w/o memory tracker (or vise versa),
but this is not always true.
NOTE, that this will slow down per-thread allocations w/o memory
tracker, since before this patch there were no memory tracking for them
while now they will be accounted in total_memory_tracker, and for
total_memory_tracker max_untracked_memory is always reached.
But this should not be significant.
2020-10-23 21:07:52 +03:00
Amos Bird
ccf59c6412
Fix definitely wrong bug
2020-10-22 22:56:45 +08:00
alexey-milovidov
2ae32e3d5c
Merge pull request #16101 from azat/http-memory-tracking-fixes
...
Fix memory tracker settings (for HTTP queries)
2020-10-22 00:00:47 +03:00
Alexey Milovidov
2619efadc8
Fix multiple issues with memory tracking
2020-10-21 03:31:34 +03:00
Vladimir Chebotarev
aa5f207fd4
Added disable_merges
option for volumes in multi-disk configuration ( #13956 )
...
Co-authored-by: Alexander Kazakov <Akazz@users.noreply.github.com>
2020-10-20 18:10:24 +03:00
Alexey Milovidov
448c87363c
Style
2020-10-20 04:29:34 +03:00
Alexander Kuzmenkov
defcd29b31
Merge pull request #16036 from ClickHouse/stress_test_improvemets
...
Minor improvements of stress test
2020-10-19 16:12:30 +03:00
Azat Khuzhin
082f30a3a1
Introduce ThreadStatus::applyQuerySettings() to reduce copy-paste
2020-10-17 15:01:53 +03:00
Alexander Tokmakov
026896835c
fixes
2020-10-16 15:20:30 +03:00
Alexander Tokmakov
95ad45a3b0
minor improvements of stress test
2020-10-15 21:14:04 +03:00
Nikolai Kochetov
939d8edf33
Merge pull request #15999 from ClickHouse/fix-after-15437
...
Continuation of 15437
2020-10-15 18:20:48 +03:00
Vitaly Baranov
5f261cec3c
Merge pull request #15199 from filimonov/non_delimited_protobuf
...
ProtobufSingle format
2020-10-15 16:58:39 +03:00
Nikolai Kochetov
963ce315b2
Merge pull request #15454 from azat/dict-prealloc
...
Speedup hashed/sparse_hashed dictionary loading by preallocating the hash table
2020-10-15 15:03:53 +03:00
Nikolai Kochetov
40f62719ff
Move event to stack.
2020-10-15 13:24:18 +03:00
Vitaly Baranov
997570780d
Merge branch 'master' into non_delimited_protobuf
2020-10-14 16:26:57 +03:00
Anton Popov
7470ac98bb
Merge pull request #15855 from hexiaoting/dev_fetch
...
Add Support for OFFSET_FETCH_CLAUSE
2020-10-14 15:21:28 +03:00
hexiaoting
dea965832a
Fix error for previous offset test
2020-10-13 11:32:43 +08:00
Azat Khuzhin
2947eff878
Fix query hang with connections_with_failover_max_tries = 0 (endless loop)
2020-10-12 22:07:26 +03:00
Mikhail Filimonov
87a8ba63f7
Few more CR fixes
2020-10-12 15:05:40 +02:00
alexey-milovidov
10e9d14466
Merge pull request #15818 from ClickHouse/style-pragma-once
...
Check for #pragma once in headers
2020-10-11 13:14:09 +03:00
alexey-milovidov
39e58128cd
Merge pull request #15812 from ClickHouse/bigint-hash
...
Minor changes in BigInt hash
2020-10-11 01:11:30 +03:00
Alexey Milovidov
269b6383f5
Check for #pragma once in headers
2020-10-10 21:37:02 +03:00
Alexey Milovidov
9f15daf45c
Remove useless metrics to avoid confusion
2020-10-10 18:52:44 +03:00
Alexey Milovidov
a2ef0f6cba
Minor changes in BigInt hash
2020-10-10 18:46:41 +03:00
Alexey Milovidov
4f2d4988c6
Fix build on Mac OS
2020-10-10 13:51:57 +03:00
Alexey Milovidov
2c71327ff5
Fix build on Mac OS
2020-10-10 11:02:02 +03:00
Azat Khuzhin
f4f79aa84a
Add HashTable::reserve() (for preallocated hashed/sparse_hashed dictionaries)
2020-10-09 21:53:57 +03:00
Azat Khuzhin
553f6aa4cd
Remove unused functions
2020-10-07 21:30:53 +03:00
alexey-milovidov
97d97f6b2e
Merge pull request #15513 from ClickHouse/aku/error-context
...
Add some context to an error message
2020-10-03 16:24:19 +03:00
alexey-milovidov
ae61f8f7a6
Update filesystemHelpers.cpp
2020-10-03 15:57:35 +03:00
alexey-milovidov
4d6402525a
Update filesystemHelpers.h
2020-10-03 15:57:12 +03:00
Alexey Milovidov
d426ba3074
Step 4: cleanup
2020-10-03 03:07:55 +03:00
Alexey Milovidov
b6ca8a0676
Step 3: check other usages, add a comment
2020-10-03 03:05:54 +03:00
Alexey Milovidov
2441be4b66
Step 2: move code to .cpp
2020-10-03 03:02:47 +03:00
Alexey Milovidov
6608de470d
Step 1: handle EINTR in statvfs
2020-10-03 03:01:32 +03:00
Alexander Kuzmenkov
3be7c7745e
Use a separate overload for formatting with fmt
2020-10-02 14:06:38 +03:00
Alexander Kuzmenkov
6e07bfe7bc
return the comment
2020-10-01 17:29:22 +03:00