Skip to content

Commit

Permalink
add 24.8 into CI/CD, add some fixes related with .inner. and .inner.i…
Browse files Browse the repository at this point in the history
…d table for embedded backup restore, ClickHouse/ClickHouse#67669
  • Loading branch information
Slach committed Aug 26, 2024
1 parent ae36a60 commit 4d83171
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions pkg/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func (b *Backuper) CreateBackup(backupName, diffFromRemote, tablePattern string,
err = b.createBackupLocal(ctx, backupName, diffFromRemote, doBackupData, schemaOnly, rbacOnly, configsOnly, backupVersion, partitionsIdMap, tables, tablePattern, disks, diskMap, diskTypes, allDatabases, allFunctions, backupRBACSize, backupConfigSize, startBackup, version)
}
if err != nil {
log.Error().Msgf("backup failed error: %v", err)
// delete local backup if can't create
if removeBackupErr := b.RemoveBackupLocal(ctx, backupName, disks); removeBackupErr != nil {
log.Error().Msgf("creating failed -> b.RemoveBackupLocal error: %v", removeBackupErr)
Expand Down Expand Up @@ -482,6 +483,12 @@ func (b *Backuper) generateEmbeddedBackupSQL(ctx context.Context, backupName str
if table.Skip {
continue
}

if version > 24004000 && (strings.HasPrefix(table.Name, ".inner.") || strings.HasPrefix(table.Name, ".inner_id.")) {
log.Warn().Msgf("`%s`.`%s` skipped, 24.4+ version contain bug for EMBEDDED BACKUP/RESTORE for `.inner.` and `.inner_id.` look details in https://github.com/ClickHouse/ClickHouse/issues/67669", table.Database, table.Name)
tablesListLen -= 1
continue
}
tablesTitle[i] = metadata.TableTitle{
Database: table.Database,
Table: table.Name,
Expand Down
8 changes: 4 additions & 4 deletions test/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ type TestEnvironment struct {
var defaultTestData = []TestDataStruct{
{
Database: dbNameOrdinary, DatabaseEngine: "Ordinary",
// 24.8 shall resolve https://github.com/ClickHouse/ClickHouse/issues/67669
Name: ".inner.table1",
// .inner. shall resolve in https://github.com/ClickHouse/ClickHouse/issues/67669
Name: ".inner_table1",
Schema: "(Date Date, TimeStamp DateTime, Logger String) ENGINE = MergeTree(Date, (TimeStamp, Logger), 8192)",
Rows: []map[string]interface{}{
{"Date": toDate("2018-10-23"), "TimeStamp": toTS("2018-10-23 07:37:14"), "Logger": "One"},
Expand Down Expand Up @@ -359,8 +359,8 @@ var defaultTestData = []TestDataStruct{
var defaultIncrementData = []TestDataStruct{
{
Database: dbNameOrdinary, DatabaseEngine: "Ordinary",
// 24.8 shall resolve https://github.com/ClickHouse/ClickHouse/issues/67669
Name: ".inner.table1",
// .inner. shall resolve in https://github.com/ClickHouse/ClickHouse/issues/67669
Name: ".inner_table1",
Schema: "(Date Date, TimeStamp DateTime, Logger String) ENGINE = MergeTree(Date, (TimeStamp, Logger), 8192)",
Rows: []map[string]interface{}{
{"Date": toDate("2019-10-26"), "TimeStamp": toTS("2019-01-26 07:37:19"), "Logger": "Seven"},
Expand Down
4 changes: 2 additions & 2 deletions test/integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf "${CUR_DIR}/_coverage_/*"

source "${CUR_DIR}/.env"

export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:-24.3}
export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:-24.8}
if [[ "${CLICKHOUSE_VERSION}" =~ ^2[1-9]+ || "${CLICKHOUSE_VERSION}" == "head" ]]; then
export CLICKHOUSE_IMAGE=${CLICKHOUSE_IMAGE:-clickhouse/clickhouse-server}
else
Expand Down Expand Up @@ -104,4 +104,4 @@ if [[ "1" == "${CLEAN_AFTER:-0}" || "0" == "${TEST_FAILED}" ]]; then
exit 1 # Exit with an error code if any command fails
fi
done
fi
fi
2 changes: 1 addition & 1 deletion test/testflows/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
mkdir -p "${CUR_DIR}/_coverage_/"
rm -rf "${CUR_DIR}/_coverage_/*"
source "${CUR_DIR}/.env"
export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:-24.3}
export CLICKHOUSE_VERSION=${CLICKHOUSE_VERSION:-24.8}
if [[ "${CLICKHOUSE_VERSION}" =~ ^2[1-9]+ || "${CLICKHOUSE_VERSION}" == "head" ]]; then
export CLICKHOUSE_IMAGE=${CLICKHOUSE_IMAGE:-clickhouse/clickhouse-server}
else
Expand Down

0 comments on commit 4d83171

Please sign in to comment.