-
Notifications
You must be signed in to change notification settings - Fork 237
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
Fix harbinger timeout bug and _multipleFileReader docstring (resolves #953, resolves #949) #954
Fix harbinger timeout bug and _multipleFileReader docstring (resolves #953, resolves #949) #954
Conversation
|
pid = int(open(harbingerFileName).read()) | ||
except ValueError: | ||
# There's a chance the downloading process died before it could write | ||
# into the harbinger file |
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.
Then you have to create the file atomically. How do you know that it didn't write half of the pid which would still parse as an int?
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.
good point
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.
Why is this still here? With the atomic creation you added, it is highly unlikely that you'll get a ValueError, correct? If so, I would rather let the ValueError through.
36ee67f
to
c99eeae
Compare
@hannes-ucsc i implemented the suggested changes |
Build failure tracked as #955. |
@arkal, see line notes. |
resolves DataBiosphere#953 The harbinger file now stores the PID of the downloading process and other requesting jobs can handle a situation where the downloading job dies without deleting the harbinger file.
c99eeae
to
5496501
Compare
@hannes-ucsc i implemented the suggested changes |
Resolves #953
Resolves #949
Harbinger timeout bug was fixed by adding logic for jobs to ensure that the process downloading the
requested file from the job store is still alive, and to handle the case where it isn't.
Docstring in AbstractCacheTest._multipleFileReader was updated to reflect the changes made to it since
the function was written.