mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/backup/actions: rename removeLockFile -> removeRestoreLock to have consistent naming with createRestoreLock function
This commit is contained in:
parent
75c7170624
commit
7c99b9eaad
1 changed files with 2 additions and 2 deletions
|
@ -194,7 +194,7 @@ func (r *Restore) Run() error {
|
||||||
logger.Infof("restored %d bytes from backup in %.3f seconds; deleted %d bytes; downloaded %d bytes",
|
logger.Infof("restored %d bytes from backup in %.3f seconds; deleted %d bytes; downloaded %d bytes",
|
||||||
backupSize, time.Since(startTime).Seconds(), deleteSize, downloadSize)
|
backupSize, time.Since(startTime).Seconds(), deleteSize, downloadSize)
|
||||||
|
|
||||||
return removeLockFile(r.Dst.Dir)
|
return removeRestoreLock(r.Dst.Dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
type statWriter struct {
|
type statWriter struct {
|
||||||
|
@ -217,7 +217,7 @@ func createRestoreLock(dstDir string) error {
|
||||||
return f.Close()
|
return f.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeLockFile(dstDir string) error {
|
func removeRestoreLock(dstDir string) error {
|
||||||
lockF := path.Join(dstDir, "restore-in-progress")
|
lockF := path.Join(dstDir, "restore-in-progress")
|
||||||
if err := os.Remove(lockF); err != nil {
|
if err := os.Remove(lockF); err != nil {
|
||||||
return fmt.Errorf("cannote remove restore lock file %q: %w", lockF, err)
|
return fmt.Errorf("cannote remove restore lock file %q: %w", lockF, err)
|
||||||
|
|
Loading…
Reference in a new issue