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

Most upvoted comments

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.