-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
kind/enhancementSomething could be better.Something could be better.platform/windowsIssues specific to WindowsIssues specific to Windowspriority/P3Low priority, something to be done once everything else is fixed.Low priority, something to be done once everything else is fixed.status/acceptedWe accept to investigate or work on it.We accept to investigate or work on it.
Description
Badger acquires an exclusive lock on the directory to prevent multiple processes from using it. The existing code in dir_windows.go file relies on an in-memory handle to prevent multiple files from accessing it.
https://github.com/dgraph-io/badger/blob/14386ac9b764cb6655cb0da7c848e244369a2a27/dir_windows.go#L82-L98
While opening we set the sharing mode to zero which means only one process can access it
From Create File Documentation
If this parameter is zero and CreateFile succeeds, the file or device cannot be shared and cannot be opened again until the handle to the file or device is closed. For more information, see the Remarks section.
We can use LockFile for instead.
Metadata
Metadata
Assignees
Labels
kind/enhancementSomething could be better.Something could be better.platform/windowsIssues specific to WindowsIssues specific to Windowspriority/P3Low priority, something to be done once everything else is fixed.Low priority, something to be done once everything else is fixed.status/acceptedWe accept to investigate or work on it.We accept to investigate or work on it.