-
Notifications
You must be signed in to change notification settings - Fork 101
Conversation
Maybe we should move |
Codecov Report
@@ Coverage Diff @@
## master #358 +/- ##
=======================================
Coverage 72.30% 72.30%
=======================================
Files 51 51
Lines 5687 5687
=======================================
Hits 4112 4112
Misses 1085 1085
Partials 490 490 Continue to review full report at Codecov.
|
cc #151 the previous attempt. |
LGTM but the file name sounds odd. Unlike a typical lock file, we do not delete |
yes, if we want to delete file we need add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
pkg/backup/client.go
Outdated
@@ -122,6 +122,11 @@ func (bc *Client) GetTS(ctx context.Context, duration time.Duration, ts uint64) | |||
return backupTS, nil | |||
} | |||
|
|||
// SetLockFile set write lock file. | |||
func (bc *Client) SetLockFile(ctx context.Context) error { | |||
return bc.storage.Write(ctx, utils.LockFile, []byte{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write some warnings to the file? Eg. DO NOT DELETE and explain what the file does.
cherry pick to release-3.1 failed |
cherry pick to release-4.0 in PR #366 |
* tests: add retry on start services (#367) * tests: add retry on start services (#367) * tests: add retry on start services * tests: forgot to add retry count :/ * tests: try to fix br_other * tests: use return 1 instead of exit 1 * tests: replace tidb_status_addr to another port * tests: meltdown tiflash tests (waiting for tiflash folks help) * tests: reset tiflash config to tiup default * tests: rename tiflash log file * tests: change tiflash status port * tests: seek tiflash if possiable * tests: fix tiflash * tests: fix a typo * tests: shrink capacity * tests: rollback tiflash config * tests: rollback... * tests: let all go back to start Can we find what make things bad...? * tests: rollback... * tests: disable tiflash test for some time * tests: rename a variable I *love* bash... * tests: use tiflash http port to test whether tiflash started Co-authored-by: 3pointer <luancheng@pingcap.com> Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
What problem does this PR solve?
Fix #328
Add a lock file at beginning, to make sure other backup task won't be able to start backup.
What is changed and how it works?
Add a lock file when storage created.
Check List
Tests
Release Note