diff options
author | Neil Fortner <fortnern@gmail.com> | 2022-08-23 16:08:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 16:08:20 (GMT) |
commit | 4df97fe6eaf65f309d2cca8e8d89737483105374 (patch) | |
tree | e00b2844975397b393600e5911e39a8de00fe34c /src/H5Oflush.c | |
parent | f777350e82a0306141d3c6eb8adddc096b1c8ff1 (diff) | |
download | hdf5-4df97fe6eaf65f309d2cca8e8d89737483105374.zip hdf5-4df97fe6eaf65f309d2cca8e8d89737483105374.tar.gz hdf5-4df97fe6eaf65f309d2cca8e8d89737483105374.tar.bz2 |
Persist dataset access properties when using H5Fstart_swmr_write - merge to 1.10 (#2058)
* Persist dataset access properties when using H5Fstart_swmr_write - merge to 1.12 branch (#2031)
* Merge GitHub #1862 (HDFFV-11308) to 1.12 branch
Persist dataset access properties when using H5Fstart_swmr_write (#1862)
* Fix HDFFV-11308 - dataset access properties disappear when using
H5Fstart_swmr_write.
* Committing clang-format changes
* Add test for H5Fstart_swmr_write() persisting DAPL settings. Fix bugs
in the library exposed by this test.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fix bug in swmr.c introduced with recent merge (double_t) (#1913)
* Fix HDFFV-11308 - dataset access properties disappear when using
H5Fstart_swmr_write.
* Committing clang-format changes
* Add test for H5Fstart_swmr_write() persisting DAPL settings. Fix bugs
in the library exposed by this test.
* Committing clang-format changes
* Replace accidental use of double_t in swmr.c with double.
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Add note to RELEASE.txt for HDFFV-11308 (#2029)
* Add note to RELEASE.txt for HDFFV-11308
* Fix formatting error in RELEASE.txt
* Committing clang-format changes
* Fix inappropriate use of HGOTO_ERROR (#2055)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Oflush.c')
-rw-r--r-- | src/H5Oflush.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5Oflush.c b/src/H5Oflush.c index 6c5ad93..777f642 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -294,7 +294,7 @@ H5O_refresh_metadata(hid_t oid, H5O_loc_t oloc) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") /* Re-open the object, re-fetching its metadata */ - if ((H5O_refresh_metadata_reopen(oid, &obj_loc, FALSE)) < 0) + if ((H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, FALSE)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") } /* end if */ @@ -390,7 +390,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, hbool_t start_swmr) +H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, hbool_t start_swmr) { void *object = NULL; /* Object for this operation */ H5I_type_t type; /* Type of object for the ID */ @@ -418,8 +418,13 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, hbool_t start_swmr) break; case H5I_DATASET: + /* Set dataset access property list in API context if appropriate */ + if (H5CX_set_apl(&apl_id, H5P_CLS_DACC, oid, TRUE) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + /* Re-open the dataset */ - if (NULL == (object = H5D_open(obj_loc, H5P_DATASET_ACCESS_DEFAULT))) + if (NULL == + (object = H5D_open(obj_loc, apl_id == H5P_DEFAULT ? H5P_DATASET_ACCESS_DEFAULT : apl_id))) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") if (!start_swmr) /* No need to handle multiple opens when H5Fstart_swmr_write() */ if (H5D_mult_refresh_reopen((H5D_t *)object) < 0) |