diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2018-07-04 02:09:19 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-07-26 22:16:32 (GMT) |
commit | f42c00b5ec649c9502248c53a6ae06bf0f65e092 (patch) | |
tree | 617a9a2c6619a484a914221a8e42012c25c1b5e2 | |
parent | 1268499234d8d1954bdc6b2159d4679851f9bc74 (diff) | |
download | hdf5-f42c00b5ec649c9502248c53a6ae06bf0f65e092.zip hdf5-f42c00b5ec649c9502248c53a6ae06bf0f65e092.tar.gz hdf5-f42c00b5ec649c9502248c53a6ae06bf0f65e092.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 d45ced0..3ee3a82 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 */ |