Skip to content

Commit a9f9ce8

Browse files
committed
watch command stop works with panic, fix #1166
Signed-off-by: Slach <[email protected]>
1 parent ad5cb74 commit a9f9ce8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v2.6.23
2+
BUG FIXES
3+
- `watch` command stop works with panic, fix [1166](https://github.com/Altinity/clickhouse-backup/issues/1166), affected versions 2.6.19-2.6.22 after [1152](https://github.com/Altinity/clickhouse-backup/issues/1152)
4+
15
# v2.6.22
26
BUG FIXES
37
- fix corner cases when `server --watch` aborts watch process when `backups_to_keep_local: -1` and `--watch-delete-source=false`, fix [1157](https://github.com/Altinity/clickhouse-backup/issues/1157), fix [1156](https://github.com/Altinity/clickhouse-backup/issues/1156), thanks @elliott-logrocket

pkg/backup/watch.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ func (b *Backuper) Watch(watchInterval, fullInterval, watchBackupNameTemplate, t
207207
}
208208
}
209209
// https://github.com/Altinity/clickhouse-backup/issues/1152
210+
// https://github.com/Altinity/clickhouse-backup/issues/1166
210211
go func() {
212+
if metrics == nil {
213+
return
214+
}
211215
remoteBackups, listRemoteErr := b.GetRemoteBackups(ctx, false)
212216
if listRemoteErr == nil && len(remoteBackups) > 0 {
213217
numberBackupsRemote := len(remoteBackups)

0 commit comments

Comments
 (0)