-
Notifications
You must be signed in to change notification settings - 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
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:
|
lib/iris/tests/unit/fileformats/netcdf/_thread_safe_nc/test_NetCDFWriteProxy.py
Show resolved
Hide resolved
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.
Thanks @trexfeathers, for the investigation and then quick turnaround on the fix for this. Just 1 comment added for future clarification. Feel free to add any more to that comment if you think its needed.
|
Thanks @HGWright! |
🚀 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: