Skip to content

Conversation

@graemes
Copy link
Contributor

@graemes graemes commented Feb 1, 2023

A small tweak to check that there is sufficient space free in the dst folder to receive a new plot.

This prevents the loop where a new plot is started only to fail because of a lack of space for the output and then repeats endlessly wasting power etc.

Copy link
Collaborator

@altendky altendky left a comment

Choose a reason for hiding this comment

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

As I recall, the basic problem is that by the time the plot is done a transfer may have completed and freed up space. Maybe this needs to be optional? Also, dst is tmp for me so if we're checking space we need enough space for both things to avoid the general case of failing a plot for being out of space.

if plotting_cfg.bladebit is None:
raise Exception(
"bladebit plotter selected but not configured, report this as a plotman bug",
if plot_util.df_b(dstdir) > plot_util.get_plotsize(32):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if we invert this check and just return in that case and then avoid indenting everything else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Have also added a check for tmp/dst and space required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

re: your first comment - the newly freed space will be detected on a subsequent check (after the appropriate refresh time)?

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.

2 participants