diff options
-rw-r--r-- | doc/VFD_SWMR_Guide.md | 12 | ||||
-rw-r--r-- | src/H5PB.c | 8 |
2 files changed, 15 insertions, 5 deletions
diff --git a/doc/VFD_SWMR_Guide.md b/doc/VFD_SWMR_Guide.md index 22dd0ca..4c70720 100644 --- a/doc/VFD_SWMR_Guide.md +++ b/doc/VFD_SWMR_Guide.md @@ -10,3 +10,15 @@ SWMR. the file. Instead of the proper variable-length data, a reader may read NULL or arbitrary bytes. Inconsistencies may also cause the reader to crash. + +* Applications should take care using HDF5 iteration APIs, especially + when iterating large numbers of objects or using long-running + application callbacks. While the library is in an iteration routine, + it does not track changes made by the writer. If the library spends more than + `max_lag` ticks in the routine, then its view of the HDF5 file will become + stale. Under those circumstances, HDF5 content could be mis-read, or the + library could crash with a diagnostic assertion. + +* At the present level of development, the writer cannot invalidate a reader's HDF5 object handles (`hid_t`s). If a reader holds an object open---that is, it has a valid handle (`hid_t`) for the object---while the writer deletes it, then + reading content through the handle may yield corrupted data or the data from some + other object, or the library may crash. @@ -1106,8 +1106,7 @@ done: * this routine performs an O(n) copy of index entries. */ static int -vfd_swmr_mdf_idx_entry_remove(H5F_shared_t *shared, uint64_t page, - bool only_mark) +shadow_idx_entry_remove(H5F_shared_t *shared, uint64_t page, bool only_mark) { ptrdiff_t i; H5FD_vfd_swmr_idx_entry_t *entry; @@ -1556,7 +1555,7 @@ H5PB_vfd_swmr__set_tick(H5F_shared_t *shared) if ( shared->tick_num != pb_ptr->cur_tick + 1 ) HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, \ - "shared->tick_num != pb_ptr->cur_tick + 1 ?!?!") + "shared->tick_num (%" PRIu64 ") != (%" PRIu64 ") pb_ptr->cur_tick + 1 ?!?!", shared->tick_num, pb_ptr->cur_tick) pb_ptr->cur_tick = shared->tick_num; @@ -2380,8 +2379,7 @@ H5PB__evict_entry(H5F_shared_t *shared, H5PB_entry_t *entry_ptr, bool force, * the image will be bigger. So the shadow file will never see the * entire image written, just the first page of the image. */ - if (vfd_swmr_mdf_idx_entry_remove(shared, entry_ptr->page, - only_mark) == -1) { + if (shadow_idx_entry_remove(shared, entry_ptr->page, only_mark) == -1) { HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, "failed to remove shadow index entry") } |