-
-
Notifications
You must be signed in to change notification settings - Fork 267
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 for issue #4849 that settings in fapl libver bounds causes unexpe… #4939
Conversation
…s unexpected H5Fopen failures. File with non-SWMR-write access can now be opened without regard for superblock version. Due to the fix, H5Fstart_swmr_write() also needs to be modified as well as the tests for libver bounds. The "RFC: Setting Bounds for Object Creation in HDF5 1.10.0" is also updated to reflect the changes.
if (H5O_get_version_bound(f->shared->low_bound, &version) < 0) | ||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5O_get_version_bound failed"); | ||
|
||
if (ninfo.hdr.version < version) |
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.
The code and error message seem to be out-of-sync. Which is correct?
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.
Fixed the error message.
So, can I just confirm something about this fix. Does it mean that when running on 1.14, if a I mean does the fix in this PR make 1.14's |
The library may create a file that cannot be opened by 1.8 if the upper bound is anything above V18. If the lower bound is not above V18 and you are careful not to use any features that require newer file formats then the file will be readable by 1.8 even if the upper bound is higher.
My understanding is that this fix eliminates a check for the superblock version that is not necessary in non-SWMR mode. In SWMR write mode, when opening the file, the library needs to write a message to the superblock, and that message is only supported in newer superblock versions, so the library needs to upgrade the superblock if it is on the older format. If it is prevented from upgrading the superblock by the libver bounds setting then it must issue an error (and it still does). The bug was it would check for this ability even if not in SWMR write mode. The libver bounds setting only affects newly created objects, it does not prevent reading previously created objects, no matter the format version, unless there's a bug like this one. |
…cted H5Fopen failures.
File with non-SWMR-write access can now be opened without regard for superblock version. Due to the fix, H5Fstart_swmr_write() also needs to be modified as well as the tests for libver bounds. The "RFC: Setting Bounds for Object Creation in HDF5 1.10.0" is also updated to reflect the changes.