From 6ea525228102ecc40e9c5a0fa16c9427366d8b75 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 10 Jun 2003 13:47:26 -0500 Subject: [svn-r7018] Purpose: Bug fix Description: The dataset's modification time was getting set whenever raw data was written with H5Dwrite. Unfortunately, this is a metadata change (which are required to be performed collectively) and H5Dwrite may be called independently from a parallel program, resulting in metadata cache corruption and/or program hangs. Solution: Don't update the modification time when raw data it written. :-( Platforms tested: FreeBSD 4.8 (sleipnir) w/parallel h5committest Misc. update: Noted in release notes and also sent to Frank for updating the docs. --- release_docs/RELEASE.txt | 3 +++ src/H5Dio.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 98e2edf..65acdeb 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -58,6 +58,9 @@ Library: Complete list of changes: + * Changed dataset modification time to _not_ be updated when raw data is + written to a dataset. The modification time is only updated when the + dataset's metadata is modified. QAK - 2003/06/10 * Changed H5Sget_select_bounds to use 'hssize_t *' for start and end parameters, instead of 'hsize_t *', to better match other parts of the dataspace API. QAK - 2003/06/04 diff --git a/src/H5Dio.c b/src/H5Dio.c index 853af23..fd4cef6 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -911,12 +911,20 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data"); } /* end else */ +#ifdef OLD_WAY +/* + * This was taken out because it can be called in a parallel program with + * independent access, causing the metadata cache to get corrupted. Its been + * disabled for all types of access (serial as well as parallel) to make the + * modification time consistent for all programs. -QAK + */ /* * Update modification time. We have to do this explicitly because * writing to a dataset doesn't necessarily change the object header. */ if (H5O_touch(&(dataset->ent), FALSE, dxpl_id)<0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time"); +#endif /* OLD_WAY */ done: if (src_id >= 0) -- cgit v0.12