You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working with a persistent storage behind a « in memory » instance of Mongodb. It seems that Mongod.is_locked check for lock presence, while mongod leave the file (empty of PID) after a successful shutdown..
To reproduce the issue, you simply need to reuse the same directory after a successful shutdown.
I’d suggest that you move the is_locked method to something similar to this:
@property
def is_locked(self):
lock_file = os.path.join(self.data_folder, "mongod.lock")
if not os.path.exists(lock_file):
return False
return os.path.getsize(lock_file) != 0
The text was updated successfully, but these errors were encountered:
I’m working with a persistent storage behind a « in memory » instance of Mongodb. It seems that
Mongod.is_locked
check for lock presence, whilemongod
leave the file (empty of PID) after a successful shutdown..To reproduce the issue, you simply need to reuse the same directory after a successful shutdown.
I’d suggest that you move the
is_locked
method to something similar to this:The text was updated successfully, but these errors were encountered: