summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMuqun Yang <myang6@hdfgroup.org>2021-09-13 18:39:06 (GMT)
committerMuqun Yang <myang6@hdfgroup.org>2021-09-13 18:39:06 (GMT)
commit54e7dd014bd6e9b57b5508f5bbf3eedbc749b5e0 (patch)
tree8002e04ded9111c80498b2503d0f7d6e1dcb9b71 /src
parente430c5ceab4d22a51f9a10b16f3dfdec8fcdd5e3 (diff)
downloadhdf5-54e7dd014bd6e9b57b5508f5bbf3eedbc749b5e0.zip
hdf5-54e7dd014bd6e9b57b5508f5bbf3eedbc749b5e0.tar.gz
hdf5-54e7dd014bd6e9b57b5508f5bbf3eedbc749b5e0.tar.bz2
1. Revise the VFD SWMR reader side code to make the expected design fail. JRM will review the change in the future.
2. Add comments on how to repeat the issues discovered when testing the expected design fail.
Diffstat (limited to 'src')
-rw-r--r--src/H5Fvfd_swmr.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index d7cb830..57c2ecd 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -1014,7 +1014,19 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
/* This is ok if we're entering the API, but it should
* not happen if we're exiting the API.
*/
+ /* JRM review this */
+ /* The following line is added for more meaningful error message when
+ * the long running API on the reader side exceeds the max_lag of ticks.
+ * KY 2021-09-02
+ * */
+ if (!entering_api && tmp_tick_num >= shared->tick_num + shared->vfd_swmr_config.max_lag) {
+ HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL,
+ "Reader's API time exceeds max_lag of ticks, may increase the value of max_lag.");
+ }
+#if 0 /* Kent */
+ /* The original code */
HDassert(entering_api || tmp_tick_num < shared->tick_num + shared->vfd_swmr_config.max_lag);
+#endif
if (!entering_api) {
H5FD_vfd_swmr_record_elapsed_ticks(shared->lf, tmp_tick_num - shared->tick_num);
@@ -1102,7 +1114,15 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
* case where the new entry is *longer*, because the
* extension could overlap with a second entry.
*/
+
+ /* JRM review this */
+ /* Kent: need to comment out the line to make reader iterate
+ * a large number of groups
+ * */
+#if 0 /*Kent*/
HDassert(oent->length == nent->length);
+#endif
+
/* the page has been altered -- evict it and
* any contained metadata cache entries.