-
Couldn't load subscription status.
- Fork 297
Protect NetCDF saving from bad Python-vs-HDF file lock timing #6760
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6760 +/- ##
==========================================
+ Coverage 90.25% 90.30% +0.05%
==========================================
Files 91 91
Lines 24630 24682 +52
Branches 4609 4625 +16
==========================================
+ Hits 22229 22290 +61
+ Misses 1624 1620 -4
+ Partials 777 772 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return DatasetOriginal(*args, **kwargs) | ||
|
|
||
|
|
||
| def test_handle_hdf_locking_error(dataset_path, monkeypatch, write_proxy): |
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 should probably also have test coverage showing that Iris will bail after 5 attempts
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.
🚀 Pull Request
Description
Thanks to @RachelNorth and @TeresaHughes for reporting this.
Even when our NetCDF save operations are fully serialised - no parallelism - HDF still occasionally fails to acquire the file. This is despite all Python locks being available at expected moments, and the file reporting as closed. During testing, 2nd retry always succeeded. This is likely caused by HDF-level locking running on a different timescale to Python-level locking - i.e. sometimes Python has released its locks but HDF still has not. Thought to be filesystem-dependent; further investigation is needed but time is limited at the moment so it seemed best to just get the protective code in immediately.
Consult Iris pull request check list
Add any of the below labels to trigger actions on this PR: