-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: extract fs lock into go-fs-lock #4631
Conversation
10ad1b1
to
3475c6c
Compare
3475c6c
to
6ffb521
Compare
@dignifiedquire will need to rebase, package.json funtimes and all |
6ffb521
to
5243400
Compare
@whyrusleeping fixed |
repo/fsrepo/fsrepo.go
Outdated
mfsr "github.com/ipfs/go-ipfs/repo/fsrepo/migrations" | ||
serialize "github.com/ipfs/go-ipfs/repo/fsrepo/serialize" | ||
dir "github.com/ipfs/go-ipfs/thirdparty/dir" | ||
lockfile "gx/ipfs/QmTAQSKWDGV7MpNGZrcj9gzbBLk3vG77EcBkCQtPphCknP/go-fs-lock" |
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.
Since I'm the extracting expert now, I should point out that this import should be grouped with the other gx'ed ones...
7360642
to
29156c5
Compare
29156c5
to
be8d915
Compare
I have bubbled the last version of go-fs-lock here (ipfs/go-fs-lock#3). I rebased on master, removed |
Did github stop at some point dismissing approvals when someone pushes new changes? |
it's a project specific setting you can change |
LGTM and RFM. |
@@ -297,7 +301,7 @@ func Init(repoPath string, conf *config.Config) error { | |||
// process. If true, then the repo cannot be opened by this process. | |||
func LockedByOtherProcess(repoPath string) (bool, error) { |
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.
@whyrusleeping any real reason to check this early (it's racy anyways)? We could get rid of the fs-repo-lock package entirely (depending directly on go4's lock) if we simply took the lock file when needed instead of checking.
License: MIT Signed-off-by: dignifiedquire <dignifiedquire@gmail.com>
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
be8d915
to
4792621
Compare
Need this code in another place, so I figured I pull it out into its own thing to share the code.
Requires ipfs/go-fs-lock#1 to be merged and published to gx.