diff --git a/ChangeLog.md b/ChangeLog.md index 69988eb9..11f8b209 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,7 @@ # v2.5.15 +IMPROVEMENTS +- increase `s3_request_timeout_ms` (23.7+) and turn off `s3_use_adaptive_timeouts` (23.11+) when `use_embedded_backup_restore: true` + BUG FIXES - fix hangs `create` and `restore` when CLICKHOUSE_MAX_CONNECTIONS=0, fix [933](https://github.com/Altinity/clickhouse-backup/issues/933) - remove obsolete `CLICKHOUSE_EMBEDDED_BACKUP_THREADS`, `CLICKHOUSE_EMBEDDED_BACKUP_THREADS` these settings could configure only via server level, not profile and query settings after 23.3 diff --git a/pkg/backup/backuper.go b/pkg/backup/backuper.go index 1fe20d15..964e3d10 100644 --- a/pkg/backup/backuper.go +++ b/pkg/backup/backuper.go @@ -183,10 +183,19 @@ func (b *Backuper) isDiskTypeEncryptedObject(disk clickhouse.Disk, disks []click func (b *Backuper) getEmbeddedBackupDefaultSettings(version int) []string { settings := []string{} - if (b.cfg.General.RemoteStorage == "s3" || b.cfg.General.RemoteStorage == "gcs") && version > 23007001 { + if (b.cfg.General.RemoteStorage == "s3" || b.cfg.General.RemoteStorage == "gcs") && version >= 23007000 { settings = append(settings, "allow_s3_native_copy=1") + if err := b.ch.Query("SET s3_request_timeout_ms=600000"); err != nil { + b.log.Fatalf("SET s3_request_timeout_ms=600000 error: %v", err) + } + + } + if (b.cfg.General.RemoteStorage == "s3" || b.cfg.General.RemoteStorage == "gcs") && version >= 23011000 { + if err := b.ch.Query("SET s3_use_adaptive_timeouts=0"); err != nil { + b.log.Fatalf("SET s3_use_adaptive_timeouts=0 error: %v", err) + } } - if b.cfg.General.RemoteStorage == "azblob" && version >= 24005001 { + if b.cfg.General.RemoteStorage == "azblob" && version >= 24005000 { settings = append(settings, "allow_azure_native_copy=1") } return settings