diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4e0ccffd..90630ccc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -121,8 +121,7 @@ jobs: - '22.8' - '23.3' - '23.8' - # wait when resolve https://github.com/ClickHouse/ClickHouse/issues/62018 - # - '24.3' + - '24.3' steps: - name: Setup golang id: setup-go @@ -236,8 +235,7 @@ jobs: - '22.8' - '23.3' - '23.8' - # wait when resolve https://github.com/ClickHouse/ClickHouse/issues/62018 - # - '24.3' + - '24.3' steps: - name: Checkout project uses: actions/checkout@v4 diff --git a/ChangeLog.md b/ChangeLog.md index a138e15f..2c984a56 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,6 +9,7 @@ IMPROVEMENTS - added support of native Clickhouse incremental backup for `use_embedded_backup_restore: true` fix [735](https://github.com/Altinity/clickhouse-backup/issues/735) - added `GCS_CHUNK_SIZE` config parameter, try to speedup GCS upload fix [874](https://github.com/Altinity/clickhouse-backup/pull/874), thanks @dermasmid - switched to golang 1.22 +- added `clickhouse/clickhouse-server:24.3` to CI/CD BUG FIXES - continue `S3_MAX_PARTS_COUNT` default value from `2000` to `4000` to continue decrease memory usage for S3 diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index 92a00b03..b1f84e6e 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -251,13 +251,15 @@ func (ch *ClickHouse) getDisksFromSystemDisks(ctx context.Context) ([]Disk, erro return nil, ctx.Err() default: type DiskFields struct { - DiskTypePresent uint64 `ch:"is_disk_type_present"` - FreeSpacePresent uint64 `ch:"is_free_space_present"` - StoragePolicyPresent uint64 `ch:"is_storage_policy_present"` + DiskTypePresent uint64 `ch:"is_disk_type_present"` + ObjectStorageTypePresent uint64 `ch:"is_object_storage_type_present"` + FreeSpacePresent uint64 `ch:"is_free_space_present"` + StoragePolicyPresent uint64 `ch:"is_storage_policy_present"` } diskFields := make([]DiskFields, 0) if err := ch.SelectContext(ctx, &diskFields, "SELECT countIf(name='type') AS is_disk_type_present, "+ + "countIf(name='object_storage_type') AS is_object_storage_type_present, "+ "countIf(name='free_space') AS is_free_space_present, "+ "countIf(name='disks') AS is_storage_policy_present "+ "FROM system.columns WHERE database='system' AND table IN ('disks','storage_policies') ", @@ -268,6 +270,10 @@ func (ch *ClickHouse) getDisksFromSystemDisks(ctx context.Context) ([]Disk, erro if len(diskFields) > 0 && diskFields[0].DiskTypePresent > 0 { diskTypeSQL = "any(d.type)" } + if len(diskFields) > 0 && diskFields[0].ObjectStorageTypePresent > 0 { + diskTypeSQL = "any(lower(if(d.type='ObjectStorage',d.object_storage_type,d.type)))" + } + diskFreeSpaceSQL := "toUInt64(0)" if len(diskFields) > 0 && diskFields[0].FreeSpacePresent > 0 { diskFreeSpaceSQL = "min(d.free_space)"