Skip to content

Commit e7bfbeb

Browse files
authored
Merge pull request #1264 from percona/PBM-1658-fix-empty-hb-file-phy-restore
PBM-1658: Physical restore fails due to empty cluster.hb file
2 parents e994b0a + 1f2f371 commit e7bfbeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pbm/restore/physical.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,8 @@ func (r *PhysRestore) checkHB(file string) error {
24022402
_, err := r.stg.FileStat(file)
24032403
// compare with restore start if heartbeat files are yet to be created.
24042404
// basically wait another hbFrameSec*2 sec for heartbeat files.
2405-
if errors.Is(err, storage.ErrNotExist) {
2405+
if errors.Is(err, storage.ErrNotExist) ||
2406+
errors.Is(err, storage.ErrEmpty) {
24062407
if r.startTS+hbFrameSec*2 < ts {
24072408
return errors.Errorf("stuck, last beat ts: %d", r.startTS)
24082409
}

0 commit comments

Comments
 (0)