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

Warn user when free disk space is too low. #6527

Merged
merged 2 commits into from Jan 24, 2023
Merged

Warn user when free disk space is too low. #6527

merged 2 commits into from Jan 24, 2023

Conversation

ghost
Copy link

@ghost ghost commented Jan 17, 2023

If there is insufficient free disk space to persist settings, user's database can be corrupted.
Check periodically for adequate free disk space, and show a warning message if necessary.

disk_space_warning

Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yonson2023!
Thank you for implementing this. Code wise it looks good!

  1. If we're low on disk space it doesn't make any sense continue running. However, we cannot shut down Bisq without showing that popup and pausing all operations is non-trivial. So what do you think about replacing the close button with a shutdown button?
    You could call:
new Popup().warning(msg).
    .useShutDownButton()
    .hideCloseButton()
    .show()
  1. We had a bug in the past where a new "DAO is out of sync" popup kept popping up and the user was not able to click the "resync" button. Some users create offers and leave Bisq open for an extended period of time. Here we are opening a new popup every time a new block gets created (if we're low on disk space). I would suggest to check whether a popup is already present.

core/src/main/java/bisq/core/app/BisqSetup.java Outdated Show resolved Hide resolved
core/src/main/resources/i18n/displayStrings.properties Outdated Show resolved Hide resolved
@alejandrogarcia83 alejandrogarcia83 added this to the v1.9.10 milestone Jan 23, 2023
@ghost ghost requested a review from alejandrogarcia83 January 24, 2023 02:35
@ghost
Copy link
Author

ghost commented Jan 24, 2023

  1. replacing the close button with a shutdown button

Shutting down when disk space is exhausted is what causes corruption of Bisq's DB files. What the user needs to do is free up some disk space urgently in this case.

I applied your other suggestions, thanks!

Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shutting down when disk space is exhausted is what causes corruption of Bisq's DB files. What the user needs to do is free up some disk space urgently in this case.

I agree with you. Nothing we can really do because it's most likely too late for long-running instances.

ACK. Tested on regtest.

The popup check is not optimal because another popup (dao out of sync, trade notification, ...) could be present already, but it is a rare case.

@alejandrogarcia83 alejandrogarcia83 merged commit 74e1078 into bisq-network:master Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant