Skip to content

Commit d5d4ee2

Browse files
committed
Merge master into branch
2 parents cadd693 + 31effc5 commit d5d4ee2

File tree

99 files changed

+991
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+991
-268
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,21 @@ Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com.
4747
You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
4848

4949
Upcoming meetups
50-
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/307289908) - May 13, 2025
5150
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/306047172/) - May 14, 2025
5251
* [Istanbul Meetup](https://www.meetup.com/clickhouse-turkiye-meetup-group/events/306978337/) - May 15, 2025
5352
* [Shenzhen Meetup](https://www.huodongxing.com/event/7803892350511) - May 17, 2025
53+
* [Belgium Meetup](https://www.meetup.com/clickhouse-belgium-user-group/events/307818346/) - May 20, 2025
5454
* [Seattle Meetup](https://www.meetup.com/clickhouse-seattle-user-group/events/307622716/) - May 20, 2025
5555
* [Tokyo Meetup](https://www.meetup.com/clickhouse-tokyo-user-group/events/307689645/) - June 5, 2025
56+
* [Cyprus Meetup](https://www.meetup.com/clickhouse-cyprus-user-group/events/307819236) - June 10, 2025
5657
* [Washington DC Meetup](https://www.meetup.com/clickhouse-dc-user-group/events/307622954/) - June 12, 2025
58+
* [Tel Aviv Meetup](https://www.meetup.com/clickhouse-meetup-israel/events/307820741/) - June 17, 2025
5759
* [Atlanta Meetup](https://www.meetup.com/clickhouse-atlanta-meetup-group/events/307627590/) - July 8, 2025
5860
* [New York Meetup](https://www.meetup.com/clickhouse-new-york-user-group/events/307627675/) - July 15, 2025
5961

6062

6163
Recent meetups
64+
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/307289908) - May 13, 2025
6265
* [Denver Meetup](https://www.meetup.com/clickhouse-denver-user-group/events/306934991/) - April 23, 2025
6366
* [Jakarta Meetup with AWS](https://www.meetup.com/clickhouse-indonesia-user-group/events/306973747/) - April 22, 2025
6467
* [Kuala Lumper Meetup with CNCF](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/306697678/) - April 16, 2025

docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ To manually turn on error history collection [`system.error_log`](../../operatio
244244
<reserved_size_rows>8192</reserved_size_rows>
245245
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
246246
<flush_on_crash>false</flush_on_crash>
247+
<symbolize>true</symbolize>
247248
</error_log>
248249
</clickhouse>
249250
```

docs/en/operations/system-tables/error_log.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@ Columns:
1818
- `event_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Event time.
1919
- `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — Code number of the error.
2020
- `error` ([LowCardinality(String)](../../sql-reference/data-types/string.md)) - Name of the error.
21+
- `last_error_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — The time when the last error happened.
22+
- `last_error_message` ([String](../../sql-reference/data-types/string.md)) — Message for the last error.
2123
- `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) — The number of times this error happened.
2224
- `remote` ([UInt8](../../sql-reference/data-types/int-uint.md)) — Remote exception (i.e. received during one of the distributed queries).
25+
- `last_error_query_id` ([String](../../sql-reference/data-types/string.md)) — Id of a query that caused the last error (if available).
26+
- `last_error_trace` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — A stack trace that represents a list of physical addresses where the called methods are stored.
27+
- `last_error_symbols` ([Array(LowCardinality(String))](../../sql-reference/data-types/array.md)), If the symbolization is enabled, contains demangled symbol names, corresponding to the `last_error_trace`.
28+
- `last_error_lines` ([Array(LowCardinality(String))](../../sql-reference/data-types/array.md)), If the symbolization is enabled, contains strings with file names with line numbers, corresponding to the `last_error_trace`.
29+
30+
The symbolization can be enabled or disabled in the `symbolize` under `error_log` in the server's configuration file.
2331

2432
**Example**
2533

docs/en/operations/system-tables/errors.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Columns:
2121
- `last_error_message` ([String](../../sql-reference/data-types/string.md)) — message for the last error.
2222
- `last_error_trace` ([Array(UInt64)](../../sql-reference/data-types/array.md)) — A [stack trace](https://en.wikipedia.org/wiki/Stack_trace) that represents a list of physical addresses where the called methods are stored.
2323
- `remote` ([UInt8](../../sql-reference/data-types/int-uint.md)) — remote exception (i.e. received during one of the distributed queries).
24+
- `last_error_query_id` ([String](../../sql-reference/data-types/string.md)) — Id of a query that caused the last error (if available).
25+
- `last_error_symbols` ([Array(LowCardinality(String))](../../sql-reference/data-types/array.md)) — Contains demangled symbol names, corresponding to the `last_error_trace`.
26+
- `last_error_lines` ([Array(LowCardinality(String))](../../sql-reference/data-types/array.md)) — Contains strings with file names with line numbers, corresponding to the `last_error_trace`.
2427

2528
:::note
2629
Counters for some errors may increase during successful query execution. It's not recommended to use this table for server monitoring purposes unless you are sure that corresponding error can not be a false positive.

docs/en/sql-reference/functions/arithmetic-functions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,3 +582,11 @@ One use case of this function is reversing IPv4s:
582582
│ 199.199.251.205 │
583583
└───────────────────────────────────────────────────────┘
584584
```
585+
586+
<!--
587+
The inner content of the tags below are replaced at doc framework build time with
588+
docs generated from system.functions. Please do not modify or remove the tags.
589+
-->
590+
591+
<!--AUTOGENERATED_START-->
592+
<!--AUTOGENERATED_END-->

src/Backups/BackupFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class BackupFactory : boost::noncopyable
3939
std::shared_ptr<IBackupCoordination> backup_coordination;
4040
std::optional<UUID> backup_uuid;
4141
bool deduplicate_files = true;
42-
std::optional<bool> allow_s3_native_copy = true;
42+
bool allow_s3_native_copy = true;
4343
bool allow_azure_native_copy = true;
4444
bool use_same_s3_credentials_for_base_backup = false;
4545
bool use_same_password_for_base_backup = false;

src/Backups/BackupIO_S3.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ namespace Setting
3333
extern const SettingsBool s3_disable_checksum;
3434
extern const SettingsUInt64 s3_max_connections;
3535
extern const SettingsUInt64 s3_max_redirects;
36+
extern const SettingsBool s3_slow_all_threads_after_network_error;
3637
}
3738

3839
namespace S3AuthSetting
@@ -49,7 +50,7 @@ namespace S3AuthSetting
4950

5051
namespace S3RequestSetting
5152
{
52-
extern const S3RequestSettingsBoolAuto allow_native_copy;
53+
extern const S3RequestSettingsBool allow_native_copy;
5354
extern const S3RequestSettingsString storage_class_name;
5455
extern const S3RequestSettingsUInt64 http_max_fields;
5556
extern const S3RequestSettingsUInt64 http_max_field_name_size;
@@ -88,6 +89,7 @@ namespace
8889
context->getRemoteHostFilter(),
8990
static_cast<unsigned>(local_settings[Setting::s3_max_redirects]),
9091
static_cast<unsigned>(local_settings[Setting::backup_restore_s3_retry_attempts]),
92+
local_settings[Setting::s3_slow_all_threads_after_network_error],
9193
local_settings[Setting::enable_s3_requests_logging],
9294
/* for_disk_s3 = */ false,
9395
request_settings.get_request_throttler,
@@ -148,7 +150,7 @@ BackupReaderS3::BackupReaderS3(
148150
const S3::URI & s3_uri_,
149151
const String & access_key_id_,
150152
const String & secret_access_key_,
151-
std::optional<bool> allow_s3_native_copy,
153+
bool allow_s3_native_copy,
152154
const ReadSettings & read_settings_,
153155
const WriteSettings & write_settings_,
154156
const ContextPtr & context_,
@@ -166,9 +168,7 @@ BackupReaderS3::BackupReaderS3(
166168
}
167169

168170
s3_settings.request_settings.updateFromSettings(context_->getSettingsRef(), /* if_changed */true);
169-
170-
if (allow_s3_native_copy)
171-
s3_settings.request_settings[S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
171+
s3_settings.request_settings[S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
172172

173173
client = makeS3Client(s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);
174174

@@ -247,7 +247,7 @@ BackupWriterS3::BackupWriterS3(
247247
const S3::URI & s3_uri_,
248248
const String & access_key_id_,
249249
const String & secret_access_key_,
250-
std::optional<bool> allow_s3_native_copy,
250+
bool allow_s3_native_copy,
251251
const String & storage_class_name,
252252
const ReadSettings & read_settings_,
253253
const WriteSettings & write_settings_,
@@ -267,10 +267,7 @@ BackupWriterS3::BackupWriterS3(
267267
}
268268

269269
s3_settings.request_settings.updateFromSettings(context_->getSettingsRef(), /* if_changed */true);
270-
271-
if (allow_s3_native_copy)
272-
s3_settings.request_settings[S3RequestSetting::allow_native_copy] = *allow_s3_native_copy;
273-
270+
s3_settings.request_settings[S3RequestSetting::allow_native_copy] = allow_s3_native_copy;
274271
s3_settings.request_settings[S3RequestSetting::storage_class_name] = storage_class_name;
275272

276273
client = makeS3Client(s3_uri_, access_key_id_, secret_access_key_, s3_settings, context_);

src/Backups/BackupIO_S3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BackupReaderS3 : public BackupReaderDefault
2323
const S3::URI & s3_uri_,
2424
const String & access_key_id_,
2525
const String & secret_access_key_,
26-
std::optional<bool> allow_s3_native_copy,
26+
bool allow_s3_native_copy,
2727
const ReadSettings & read_settings_,
2828
const WriteSettings & write_settings_,
2929
const ContextPtr & context_,
@@ -54,7 +54,7 @@ class BackupWriterS3 : public BackupWriterDefault
5454
const S3::URI & s3_uri_,
5555
const String & access_key_id_,
5656
const String & secret_access_key_,
57-
std::optional<bool> allow_s3_native_copy,
57+
bool allow_s3_native_copy,
5858
const String & storage_class_name,
5959
const ReadSettings & read_settings_,
6060
const WriteSettings & write_settings_,

src/Backups/BackupSettings.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace ErrorCodes
2727
M(Bool, async) \
2828
M(Bool, decrypt_files_from_encrypted_disks) \
2929
M(Bool, deduplicate_files) \
30+
M(Bool, allow_s3_native_copy) \
3031
M(Bool, allow_azure_native_copy) \
3132
M(Bool, use_same_s3_credentials_for_base_backup) \
3233
M(Bool, use_same_password_for_base_backup) \
@@ -63,13 +64,7 @@ BackupSettings BackupSettings::fromBackupQuery(const ASTBackupQuery & query)
6364
else
6465

6566
LIST_OF_BACKUP_SETTINGS(GET_BACKUP_SETTINGS_FROM_QUERY)
66-
67-
if (setting.name == "allow_s3_native_copy")
68-
{
69-
SettingFieldBoolAuto bool_auto{setting.value};
70-
res.allow_s3_native_copy = bool_auto.is_auto ? std::nullopt : std::make_optional(bool_auto.base.value);
71-
}
72-
else
67+
/// else
7368
{
7469
/// (if setting.name is not the name of a field of BackupSettings)
7570
res.core_settings.emplace_back(setting);
@@ -111,9 +106,6 @@ void BackupSettings::copySettingsToQuery(ASTBackupQuery & query) const
111106

112107
LIST_OF_BACKUP_SETTINGS(COPY_BACKUP_SETTINGS_TO_QUERY)
113108

114-
if (allow_s3_native_copy)
115-
query_settings->changes.emplace_back("allow_s3_native_copy", static_cast<Field>(SettingFieldBool{*allow_s3_native_copy}));
116-
117109
/// Copy the core settings to the query too.
118110
query_settings->changes.insert(query_settings->changes.end(), core_settings.begin(), core_settings.end());
119111

src/Backups/BackupSettings.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ struct BackupSettings
4242
/// Whether the BACKUP will omit similar files (within one backup only).
4343
bool deduplicate_files = true;
4444

45-
/// Whether S3 native copy is allowed.
46-
/// If not set, then S3 native copy will be allowed only if the source and destination credentials are the same.
47-
std::optional<bool> allow_s3_native_copy;
45+
/// Whether native copy is allowed (optimization for cloud storages, that sometimes could have bugs)
46+
bool allow_s3_native_copy = true;
4847

4948
/// Whether native copy is allowed (optimization for cloud storages, that sometimes could have bugs)
5049
bool allow_azure_native_copy = true;

0 commit comments

Comments
 (0)