badger: windows LOCK exists, program can't restart
In the windows environment, if the program is killed and the LOCK file is not deleted, the restart program will be wrongly reported
Cannot create pid lock file "C:\\Users\\User\\Desktop\\chain.exe\\datadir\\LOCK". Another process is using this Badger database: open C:\Users\User\Desktop\chain.exe\datadir\LOCK: The file exists.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 18 (7 by maintainers)
Commits related to this issue
- adding windows temporary file support to pid (lock) file. attempting to fix the need to delete the pid file when badger is closed and the file remains. Ref: #424 — committed to dgraph-io/badger by deleted user 6 years ago
- adding windows temporary file support to pid (lock) file. attempting to fix the need to delete the pid file when badger is closed and the file remains. using windows system calls to create a in-memor... — committed to dgraph-io/badger by deleted user 6 years ago
- Windows lock exists cant restart after crash (#572) This PR changes the file locking system in Window to use an in-memory handler. No new dependencies are added. It attemps to fix the need to manuall... — committed to dgraph-io/badger by srfrog 6 years ago
If you can point us to how LevelDB is doing this, or others are doing this – we can implement it. But, not sure what we can change now…
Also, if you can tell us the steps that you took to reproduce this, that’d be great.
You can manually delete the lock file, and restart. Let me know if that doesn’t for some reason. Or, if you need some other resolution.