-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add ways to remove 0-byte pyramid files #1486
Conversation
If a pixel buffer is instantiated with a pyramid file of length 0, then the file is deleted so that the pyramid file can be regenerated. See ticket #11395.
'bin/omero admin fixpyramids' will now remove any 0-length pyramid files that do not have a corresponding lock file or temp file. This allows administrators to force regeneration of pyramid files that could not be created before (e.g. due to OOMs as a result of the server configuration). See ticket #11395.
def fixpyramids(self, args, config): | ||
self.check_access(); | ||
config = config.as_map() | ||
omero_data_dir = '/OMERO' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack! For diagnostics, this pattern (`/OMERO') makes sense, but for fixpyramids (and cleanse!) it's scary. I can fix in another PR if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix here if told what the correct alternative is, otherwise yes, an additional PR (or a PR against this branch) would be appreciated since I'm a little out of my depth here.
I haven't had a chance to test this, but conceptually:
|
This should give you an invalid (0-length) pyramid with no OOM: I haven't reliably been able to come up with a fake file that will generate an OOM, but |
If the original import was not successful (as would be the case with the above .fake file), then pyramid regeneration is not attempted. If the import was successful, then regeneration is attempted when the image is clicked in Insight/web. I tried this first with I then tried with |
Hmmm....ok. That may be the best way forward, but we are certainly in the case that a file which OOMs will do so on every view, right? (At least in PixelData). Assuming a larger file and more realistic memory settings, that would be quiet the explosion (i.e. server overhead) on each kaboom. |
Yes, you'd still see an OOM on every view, which I realize is not ideal (though hopefully the user would learn pretty quickly to stop clicking the button). Still happy to revert that commit, though we are at least not in the situation of having infinite loops of OOMs behind the scenes. |
While testing this PR (not related) on a server with 200MB of memory:
|
melissalinkert#3 opened. I also saw the behavior of re-clicking on an OOM'd image re-attempts the generation. Let's discuss possible pitfalls regarding that with @chris-allan. Seems like me may only need one of these two solutions. |
@chris-allan and I both worry about the loop logic. I'd propose:
If so, I'll close this PR and open another one with both your and my |
No objections - that sounds like a good plan. |
Closing in favor of #1589 |
See https://trac.openmicroscopy.org.uk/ome/ticket/11395
There are two approaches in this PR: one is to automatically remove 0-byte pyramid files automatically when a
BfPixelBuffer
attempts to load them, and the other is thebin/omero admin fixpyramids
command which will remove all 0-byte pyramid files that do not have a lock or temp file.bin/omero admin fixpyramids
should satisfy the ticket requirements, but I'd be happy to move that logic to a different one of the CLI plugins and/or changefixpyramids
to something else.I'm not 100% sure of the
BfPixelBuffer
changes - the impact shouldn't be huge, but I don't know to what extent that will cause an infinite pyramid generation loop with seriously broken data. If it's going too far, happy to revert the corresponding commit.