Commit Graph

160011 Commits

Author SHA1 Message Date
Azat Khuzhin
88a3dbe716 Fix inaccurate MemoryTracking metric in case of allocation failures
MemoryTracking metric takes into account memory allocation even in case
of this allocation will fail with MEMORY_LIMIT_EXCEEDED, which is not
good, which eventually will lead to `amount` and `MemoryTracking`
mismatch, I found one server with **43x difference**.

<details>

```sql
SELECT
    event_time_microseconds,
    message
FROM system.text_log
WHERE (event_date = (today() - 1)) AND (logger_name = 'MemoryTracker') AND (message LIKE '%total%')
ORDER BY 1 DESC
LIMIT 1

Query id: 64d60852-fa14-4ed1-adb1-d4bbd6159475

   ┌────event_time_microseconds─┬─message───────────────────────────────────┐
1. │ 2024-11-27 05:09:48.157608 │ Current memory usage (total): 471.00 GiB. │
   └────────────────────────────┴───────────────────────────────────────────┘
```

```sql
SELECT
    metric,
    formatReadableSize(value)
FROM system.metrics
WHERE (metric ILIKE '%mem%') OR (metric ILIKE '%jemalloc%')
ORDER BY value ASC

Query id: af7908a8-956a-4684-b7c5-b2e0c6fa06f4

   ┌─metric────────────────────────┬─formatReadableSize(value)─┐
1. │ MergesMutationsMemoryTracking │ 0.00 B                    │
2. │ MemoryTracking                │ 20.37 TiB                 │
   └───────────────────────────────┴───────────────────────────┘
```

</details>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-12-01 19:48:25 +01:00
Antonio Andelic
e940ceaacc Merge branch 'master' into better-memory-usage-estimation 2024-12-01 19:16:37 +01:00
Yakov Olkhovskiy
76dee30dee make Field rvalue reference safeGet to return a copy of its content instead of reference 2024-12-01 17:54:05 +00:00
Nikita Taranov
0041fdf497 impl 2024-12-01 18:50:55 +01:00
Antonio Andelic
e95c35e460 Merge branch 'master' into update-nuraft 2024-12-01 18:43:15 +01:00
Alexey Milovidov
2326d12969
Merge pull request #72656 from ClickHouse/http_response_headers
Add `http_response_headers` setting
2024-12-01 14:01:59 +00:00
“JiaQi
14d07d8dcf bug fix 2024-12-01 21:00:17 +08:00
Alexey Milovidov
e841e74d32 Add http_response_headers setting 2024-11-30 23:24:51 +01:00
Alexey Milovidov
2372e9fece Add http_response_headers setting 2024-11-30 22:53:13 +01:00
Alexey Milovidov
bdff47973a Check for duplicates 2024-11-30 22:14:42 +01:00
Alexey Milovidov
87601d461f Add http_response_headers setting 2024-11-30 22:05:03 +01:00
Alexey Milovidov
076a8f8d9e Add http_response_headers setting 2024-11-30 22:02:26 +01:00
alesapin
1d0caf1c90 Trivial change 2024-11-30 18:51:24 +01:00
alesapin
3bc731541c Add test 2024-11-30 18:39:56 +01:00
alesapin
38bd543a42 Add finals 2024-11-30 18:39:26 +01:00
Anton Popov
6d0876b828 try to fix test 2024-11-30 13:47:41 +00:00
Vitaly Baranov
9554d355b9
Fix formatting in InterpreterCreateQuery.cpp 2024-11-30 12:43:38 +01:00
Sema Checherinda
dc4bbc8d73
Merge pull request #72642 from ClickHouse/revert-72395-chesema-dtor-Finalizer
Revert "make d-tor Finalizer more obvious"
2024-11-30 11:00:24 +00:00
Alexander Gololobov
a44e09a0c4 Merge branch 'master' of github.com:ClickHouse/ClickHouse into measure_logger_time 2024-11-30 11:44:57 +01:00
Paweł Kudzia
a81bacea75
Adding example for JSONExtract which refers to a nested entry in JSON
Hopefully this one prevents others from asking question like in https://github.com/ClickHouse/ClickHouse/issues/72530
2024-11-30 11:18:06 +01:00
Yarik Briukhovetskyi
04c3208a0e
Merge branch 'ClickHouse:master' into fix_datetime64_in_datetime64 2024-11-30 10:15:37 +01:00
“JiaQi
f66f680d26 1. check has_limit_below_one_block for asc order read
2. fix tests
2024-11-30 13:57:37 +08:00
Anton Popov
d7f2f0e098 better prewarm of mark and primary index caches 2024-11-30 01:48:50 +00:00
Vladimir Cherkasov
0589253688
Merge pull request #72460 from ClickHouse/vdimir/join_select_inner_table
Resubmit #68682, att2
2024-11-30 00:59:23 +00:00
Anton Popov
6e5582f899
Merge pull request #72599 from CurtizJ/revert-65488
Revert "Merge pull request #65488 from zvonand/zvonand-ttl"
2024-11-29 23:44:00 +00:00
Anton Popov
6e760f4e45
Merge pull request #72611 from CurtizJ/fix-prewarm-caches-race
Fix data race in prewarm of mark cache
2024-11-29 22:14:24 +00:00
Alexander Gololobov
fc01a17c89
Fix description 2024-11-29 22:31:35 +01:00
Alexander Gololobov
333b2918ba
Update check-style 2024-11-29 21:25:28 +01:00
Yarik Briukhovetskyi
bc3bc8913e
Add nullable check for data types 2024-11-29 20:59:07 +01:00
Alexander Gololobov
5e0285d38a Measure time consumed by logging 2024-11-29 20:49:55 +01:00
Sema Checherinda
043d6e7bbf
Revert "make d-tor Finalizer more obvious" 2024-11-29 20:37:03 +01:00
Yarik Briukhovetskyi
ca5faf14ca
Update Set.cpp 2024-11-29 20:18:41 +01:00
Miсhael Stetsyuk
af04a3ce68
Merge pull request #72490 from ClickHouse/add-index-granularity-internal-array-size-metric
add metric MergeTreeIndexGranularityInternalArraysTotalSize
2024-11-29 19:17:03 +00:00
Yarik Briukhovetskyi
98a358db10
Fix tests 2024-11-29 18:49:09 +01:00
Yarik Briukhovetskyi
27ffde3f3e
Init 2024-11-29 18:45:53 +01:00
Dmitry Novik
a528b51a97 Fix identifier qualification in the presence of ARRAY JOIN 2024-11-29 17:00:14 +01:00
vdimir
0a5bc248fd
Merge branch 'master' into vdimir/join_select_inner_table 2024-11-29 15:50:25 +00:00
Michael Stetsyuk
485f53e95e add test 2024-11-29 14:42:36 +00:00
Anton Popov
407e135231 Merge remote-tracking branch 'upstream/master' into HEAD 2024-11-29 14:02:22 +00:00
János Benjamin Antal
62368fb2a3
Merge pull request #72375 from jiebinn/shared_mutex_optimization
Optimize the mutex with shared_mutex in the memory tracker
2024-11-29 13:29:13 +00:00
Anton Popov
1bcc53dbf3 Merge remote-tracking branch 'upstream/master' into HEAD 2024-11-29 12:57:54 +00:00
Antonio Andelic
f56b9c353c Reserve exact size 2024-11-29 13:57:01 +01:00
Antonio Andelic
88db1fe07f Lock commit before creating snapshot manually 2024-11-29 13:39:57 +01:00
Mikhail Artemenko
b81ee27750
Merge pull request #71406 from azat/automatic-external-aggregation
Automatic GROUP/ORDER BY to disk based on the memory usage
2024-11-29 12:27:43 +00:00
Anton Popov
938b7ad848
Merge pull request #72615 from CurtizJ/fix-system-load-primary-key
Fix tests for `SYSTEM LOAD PRIMARY KEY`
2024-11-29 12:22:06 +00:00
Alexey Katsman
d7167bd103
Merge pull request #72548 from alexkats/dict
Add source query validation for dictionaries
2024-11-29 11:25:40 +00:00
Robert Schulze
4c4c7b4fce
Update 03202_system_load_primary_key.sql 2024-11-29 12:08:57 +01:00
Antonio Andelic
f9113db7a4 Better memory usage approx 2024-11-29 12:00:35 +01:00
Daniil Ivanik
300d36bb72
Merge pull request #72277 from ClickHouse/divanik/iceberg_format_1_version_inconsistency_warning
Fix iceberg v1 format metadata json inconsistency
2024-11-29 10:49:15 +00:00
alesapin
d25b15a3b1
Merge pull request #72613 from ClickHouse/nopctest
Remove flaky test_page_cache
2024-11-29 10:16:13 +00:00