diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2018-07-04 02:09:19 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2018-07-04 02:09:19 (GMT) |
commit | ef10aa6211779b4f99606243651adcd716904f4e (patch) | |
tree | 8e8ddff4a922ff83feee8e3c71ca1683801ea426 | |
parent | 6190641722e194f8827a5a68dce72dadac4b8157 (diff) | |
download | hdf5-ef10aa6211779b4f99606243651adcd716904f4e.zip hdf5-ef10aa6211779b4f99606243651adcd716904f4e.tar.gz hdf5-ef10aa6211779b4f99606243651adcd716904f4e.tar.bz2 |
Fix for HDFFV-10509
-rw-r--r-- | src/H5Dchunk.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 7216c49..d1528eb 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2933,8 +2933,21 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5F_set_coll_md_read(idx_info.f, temp_cmr); #endif /* H5_HAVE_PARALLEL */ - /* Cache the information retrieved */ - H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, udata); + /* + * Cache the information retrieved. + * + * Note that if we are writing to the dataset in parallel and filters + * are involved, we skip caching this information as it is highly likely + * that the chunk information will be invalidated as a result of the + * filter operation (e.g. the chunk gets re-allocated to a different + * address in the file and/or gets re-allocated with a different size). + * If we were to cache this information, subsequent reads/writes would + * retrieve the invalid information and cause a variety of issues. + */ +#ifdef H5_HAVE_PARALLEL + if ( !((H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR) && dset->shared->dcpl_cache.pline.nused) ) +#endif + H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, udata); } /* end if */ } /* end else */ |