*:fix point-in-time backup
Backup process should be able to read all WALs until io.EOF to generate a point-in-time backup. Our WAL file is append-only. And the backup process will lock all files before start reading, which can prevent the gc routine from removing any files in the middle.
This commit is contained in:
@ -66,7 +66,7 @@ func handleBackup(c *cli.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
w, err := wal.OpenNotInUse(srcWAL, walsnap)
|
||||
w, err := wal.OpenForRead(srcWAL, walsnap)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user