-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add pid.lock file locking in the opt.Dir directory #103
Conversation
Reviewed 3 of 3 files at r1. kv.go, line 150 at r1 (raw file):
call it kv.go, line 329 at r1 (raw file):
call it kv.go, line 330 at r1 (raw file):
No need for this variable. Just put the contents directly in kv.go, line 339 at r1 (raw file):
ioutil.Write kv.go, line 345 at r1 (raw file):
closeErr kv.go, line 352 at r1 (raw file):
This func gets called exactly once. Might as well invoke the logic directly from the caller.
kv.go, line 358 at r1 (raw file):
Is this the case? Any relevant documentation links would be useful. Comments from Reviewable |
Review status: 1 of 3 files reviewed at latest revision, 7 unresolved discussions. kv.go, line 150 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. kv.go, line 329 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. kv.go, line 330 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Okay, then kv_test will have a copy. kv.go, line 339 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
You mean ioutil.WriteFile? It's no good because we need to O_EXCL. kv.go, line 345 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. kv.go, line 352 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Reasonable if createLockFile takes the full path directly too. Done. kv.go, line 358 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Yes, definitely. See the man page for fsync. Also see for example etcd-io/etcd#6368 . Comments from Reviewable |
Reviewed 2 of 2 files at r2. kv.go, line 339 at r1 (raw file): Previously, srh (Sam Hughes) wrote…
OK. Actually meant to remove that comment, somehow slipped through. kv.go, line 358 at r1 (raw file): Previously, srh (Sam Hughes) wrote…
Can you add this link as a comment here. Because this means, every time we create a new file, we need to do this dir sync? That'd require more work. Comments from Reviewable |
Address the comment before submitting. Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
In master as of e13ddb2. |
Adds a pid.lock file.
Connects to hypermodeinc/dgraph#1185
This change is