Skip to content

Commit

Permalink
don't backup mutations for schemaOnly, rbacOnly, configsOnly,
Browse files Browse the repository at this point in the history
added to changelog:

Add `SHARDED_OPERATION_MODE` option, to easy create backup for sharded cluster, available values none (no sharding), table (table granularity), database (database granularity), first-replica (on the lexicographically sorted first active replica), thanks @mskwon, fix [639](#639), fix [648](#648)
  • Loading branch information
Slach committed Aug 3, 2023
1 parent 7ce6103 commit 109421c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ IMPROVEMENTS
- Implementation blacklist for table engines during backup / download / upload / restore [537](https://github.com/Altinity/clickhouse-backup/issues/537)
- restore RBAC / configs, refactoring restart clickhouse-server via `sql:SYSTEM SHUTDOWN` or `exec:systemctl restart clickhouse-server`, add `--rbac-only` and `--configs-only` options to `create`, `upload`, `download`, `restore` command. fix [706]https://github.com/Altinity/clickhouse-backup/issues/706
- Backup/Restore RBAC related objects from Zookeeper via direct connection to zookeeper/keeper, fix [604](https://github.com/Altinity/clickhouse-backup/issues/604)
- Add `SHARDED_OPERATION_MODE` option, to easy create backup for sharded cluster, available values none (no sharding), table (table granularity), database (database granularity), first-replica (on the lexicographically sorted first active replica), thanks @mskwon, fix [639](https://github.com/Altinity/clickhouse-backup/issues/639), fix [648](https://github.com/Altinity/clickhouse-backup/pull/648)

BUG FIXES
- fix possible create backup failures during UNFREEZE not exists tables, affected 2.2.7+ version, fix [704](https://github.com/Altinity/clickhouse-backup/issues/704)
Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (b *Backuper) createBackupLocal(ctx context.Context, backupName string, par
// https://github.com/Altinity/clickhouse-backup/issues/529
log.Debug("get in progress mutations list")
inProgressMutations := make([]metadata.MutationMetadata, 0)
if b.cfg.ClickHouse.BackupMutations {
if b.cfg.ClickHouse.BackupMutations && !schemaOnly && !rbacOnly && !configsOnly {
inProgressMutations, err = b.ch.GetInProgressMutations(ctx, table.Database, table.Name)
if err != nil {
log.Error(err.Error())
Expand Down
2 changes: 1 addition & 1 deletion test/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ func TestDoRestoreConfigs(t *testing.T) {

ch.chbackend.Close()
ch.connectWithWait(r, 1*time.Second, 1*time.Second)

ch.queryWithNoError(r, "SYSTEM RELOAD CONFIG")
selectEmptyResultForAggQuery := "SELECT value FROM system.settings WHERE name='empty_result_for_aggregation_by_empty_set'"
var settings string
r.NoError(ch.chbackend.SelectSingleRowNoCtx(&settings, selectEmptyResultForAggQuery))
Expand Down

0 comments on commit 109421c

Please sign in to comment.