Skip to content
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

Restore may be started while a snapshot of the same profile is taken #1589

Open
aryoda opened this issue Dec 17, 2023 · 0 comments
Open

Restore may be started while a snapshot of the same profile is taken #1589

aryoda opened this issue Dec 17, 2023 · 0 comments
Labels
Bug HELP-WANTED Used by 24pullrequests.com to suggest issues Low relevant, but not urgent

Comments

@aryoda
Copy link
Contributor

aryoda commented Dec 17, 2023

Observation

While documenting the lock file usage of BiT in v1.4.1 (currently released version as at today) I saw
that snapshot() checks if a restore is running for the same profile to avoid conflicts (esp.
when restoring directly into the original folders of the snapshot files):

elif not restore_instance.check():
logger.warning('Restore is still running. Stop backup until \

I could find not a check for a running backup ("take snapshot") in ´restore()` so IMHO it may happen that

  • a new snapshot is taken in one process
  • a restore for the same profile may be started then in another process

instance = ApplicationInstance(
pidFile=self.config.restoreInstanceFile(),
autoExit=False,
flock=True)
if instance.check():
instance.startApplication()
else:
logger.warning('Restore is already running', self)
return

Possible Impact

  • TODO to be analyzed

PS: I think this may be good issue for new BiT developers (just test by starting two instances and then try to understand the source code of the restore() function...

@aryoda aryoda added Bug Low relevant, but not urgent labels Dec 17, 2023
@buhtz buhtz added the HELP-WANTED Used by 24pullrequests.com to suggest issues label Dec 18, 2023
@buhtz buhtz added this to the 3rd release from now milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug HELP-WANTED Used by 24pullrequests.com to suggest issues Low relevant, but not urgent
Projects
None yet
Development

No branches or pull requests

2 participants