summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-08 15:25:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-08 15:25:58 (GMT)
commit67a1ff05db79ca0e7cd44de85997b128a158e229 (patch)
tree7b4bcc59e856569cc45c9292067ef7365abee91b /src/H5Distore.c
parent8957d31809ef6637e2b1ea62f76160da0a24e936 (diff)
downloadhdf5-67a1ff05db79ca0e7cd44de85997b128a158e229.zip
hdf5-67a1ff05db79ca0e7cd44de85997b128a158e229.tar.gz
hdf5-67a1ff05db79ca0e7cd44de85997b128a158e229.tar.bz2
[svn-r8625] Purpose:
Code optimization Description: Avoid pushing errors on error stack when an object is not found in a B-tree. Sometimes we are just checking if the object exists before we insert it into the B-tree and the higher levels in the library should be responsible for determining if not finding the object in B-tree is really an error. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel too minor to require h5committest
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r--src/H5Distore.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 032a776..94a9242 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1440,8 +1440,10 @@ H5D_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
} else {
H5D_fill_value_t fill_status;
+#ifdef OLD_WAY
/* Clear the error stack from not finding the chunk on disk */
H5E_clear(NULL);
+#endif /* OLD_WAY */
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
@@ -2031,9 +2033,17 @@ H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
/* Go get the chunk information */
if (H5B_find (f, dxpl_id, H5B_ISTORE, layout->u.chunk.addr, udata)<0) {
+ /* Note: don't push error on stack, leave that to next higher level,
+ * since many times the B-tree is searched in order to determine
+ * if a chunk exists in the B-tree or not. -QAK
+ */
+#ifdef OLD_WAY
H5E_clear(NULL);
HGOTO_ERROR(H5E_BTREE,H5E_NOTFOUND,HADDR_UNDEF,"Can't locate chunk info");
+#else /* OLD_WAY */
+ HGOTO_DONE(HADDR_UNDEF)
+#endif /* OLD_WAY */
} /* end if */
/* Success! Set the return value */