StreamWriter: Opus-provided improvements to improve resilience for errors
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m17s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m22s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 16m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m41s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m3s
Build Packages / build:rpm (rocky8) (push) Successful in 18m10s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m15s
Build Packages / build:rpm (rocky9) (push) Successful in 19m17s
Build Packages / Generate python client (push) Successful in 1m46s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m9s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 2m0s
Build Packages / DIALS test (push) Failing after 9m1s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m43s
Build Packages / XDS test (JFJoch plugin) (push) Failing after 9m9s
Build Packages / XDS test (durin plugin) (push) Failing after 9m43s
Build Packages / XDS test (neggia plugin) (push) Failing after 8m41s
Build Packages / Unit tests (push) Failing after 56m55s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m17s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m22s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 16m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m41s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m3s
Build Packages / build:rpm (rocky8) (push) Successful in 18m10s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m15s
Build Packages / build:rpm (rocky9) (push) Successful in 19m17s
Build Packages / Generate python client (push) Successful in 1m46s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m9s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 2m0s
Build Packages / DIALS test (push) Failing after 9m1s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m43s
Build Packages / XDS test (JFJoch plugin) (push) Failing after 9m9s
Build Packages / XDS test (durin plugin) (push) Failing after 9m43s
Build Packages / XDS test (neggia plugin) (push) Failing after 8m41s
Build Packages / Unit tests (push) Failing after 56m55s
This commit is contained in:
+26
-7
@@ -727,12 +727,24 @@ void HDF5File::Close() {
|
||||
if (id < 0)
|
||||
return;
|
||||
|
||||
if (H5Fflush(id, H5F_SCOPE_GLOBAL) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Failed to flush HDF5 file");
|
||||
|
||||
if (H5Fclose(id) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Failed to close HDF5 file");
|
||||
// Invalidate first; if anything below fails (e.g. ENOSPC) we must NOT
|
||||
// leave a live id behind for the destructor or later code to touch.
|
||||
const hid_t local_id = id;
|
||||
id = -1;
|
||||
|
||||
herr_t flush_err = 0;
|
||||
H5E_BEGIN_TRY {
|
||||
flush_err = H5Fflush(local_id, H5F_SCOPE_GLOBAL);
|
||||
} H5E_END_TRY;
|
||||
|
||||
herr_t close_err = 0;
|
||||
H5E_BEGIN_TRY {
|
||||
close_err = H5Fclose(local_id);
|
||||
} H5E_END_TRY;
|
||||
|
||||
if (flush_err < 0 || close_err < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5,
|
||||
"Failed to flush/close HDF5 file (likely no space left on device)");
|
||||
}
|
||||
|
||||
HDF5File::~HDF5File() {
|
||||
@@ -848,9 +860,16 @@ void HDF5DataSet::Close() {
|
||||
if (id < 0)
|
||||
return;
|
||||
|
||||
if (H5Dclose(id) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Cannot close HDF5 dataset");
|
||||
const hid_t local_id = id;
|
||||
id = -1;
|
||||
|
||||
herr_t err = 0;
|
||||
H5E_BEGIN_TRY {
|
||||
err = H5Dclose(local_id);
|
||||
} H5E_END_TRY;
|
||||
|
||||
if (err < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Cannot close HDF5 dataset");
|
||||
}
|
||||
|
||||
HDF5DataSet::~HDF5DataSet() {
|
||||
|
||||
Reference in New Issue
Block a user