diff options
author | Muqun Yang <myang6@hdfgroup.org> | 2020-02-10 20:45:21 (GMT) |
---|---|---|
committer | Muqun Yang <myang6@hdfgroup.org> | 2020-02-10 20:45:21 (GMT) |
commit | 04d4d9c93a824b7a860993fc217c9cc497ac5441 (patch) | |
tree | 206f958d83977ca9af542fc2fbc044b58340bfa4 | |
parent | 233a8bb8a9cebba6fd06d2afd81ec4f13d92781b (diff) | |
download | hdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.zip hdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.tar.gz hdf5-04d4d9c93a824b7a860993fc217c9cc497ac5441.tar.bz2 |
HDFFV-11014, fix the h5repack issue that misses a few attributes during the repacking. The flag that checks the object reference attribute is not updated properly. The fix is trivial. Just need to move the flag update line into the inner loop. Tested at Jelly. Also update the release.txt.
-rw-r--r-- | release_docs/RELEASE.txt | 10 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_refs.c | 9 |
2 files changed, 18 insertions, 1 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e874dcc..3755106 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -385,6 +385,16 @@ Bug Fixes since HDF5-1.10.5 release Tools ----- + - h5repack was fixed to repack the reference attributes properly. + The code line that checks if the update of reference inside a compound + datatype is misplaced outside the code block loop that carries out the + check. In consequence, the next attribute that is not the reference + type was repacked again as the reference type and caused the failure of + repacking. The fix is to move the corresponding code line to the correct + code block. + + (KY -2020/02/10, HDFFV-11014) + - h5repack was fixed to repack datasets with external storage to other types of storage. diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c index 7e8951f..f62ad74 100644 --- a/tools/src/h5repack/h5repack_refs.c +++ b/tools/src/h5repack/h5repack_refs.c @@ -530,9 +530,16 @@ static int copy_refs_attr(hid_t loc_in, ref_comp_size = NULL; } } + /* This line below needs to be moved in this loop instead of inserting outside. Otherwise, + ref_comp_field_n may be >0 for the next attribute, which may not be + the reference type and will be accidently treated as the reference type. + It will then cause the H5Acreate2 failed since that attribute is already created. + KY 2020-02-10 + */ + is_ref_comp = (ref_comp_field_n > 0); + } - is_ref_comp = (ref_comp_field_n > 0); if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) { if (H5Tclose(mtype_id) < 0) |