diff options
author | Neil Fortner <fortnern@gmail.com> | 2022-08-22 18:15:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 18:15:56 (GMT) |
commit | 955ac6a29eb9094e3c155de3d9cd222ccc8ccf57 (patch) | |
tree | 218b0501dfd39216fb75231203e950b82af45d77 /src/H5Oflush.c | |
parent | 82ebc9c370164931861f0d174e2b17a109478665 (diff) | |
download | hdf5-955ac6a29eb9094e3c155de3d9cd222ccc8ccf57.zip hdf5-955ac6a29eb9094e3c155de3d9cd222ccc8ccf57.tar.gz hdf5-955ac6a29eb9094e3c155de3d9cd222ccc8ccf57.tar.bz2 |
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>
Diffstat (limited to 'src/H5Oflush.c')
-rw-r--r-- | src/H5Oflush.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5Oflush.c b/src/H5Oflush.c index a622bd1..e02a084 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -334,7 +334,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, connector, FALSE)) < 0) + if ((H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, FALSE)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") /* Restore the number of references on the VOL connector */ @@ -439,7 +439,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector, hbool_t start_swmr) +H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t *vol_connector, + hbool_t start_swmr) { void *object = NULL; /* Object for this operation */ H5I_type_t type; /* Type of object for the ID */ @@ -468,8 +469,13 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector 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) |