File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,7 +245,17 @@ void FileEngine::end_sub_transaction()
245245 file_sub_transaction_[self].push (file->read_async (size));
246246
247247 XBT_DEBUG (" Wait for the %d subscribe activities for the transaction" , file_sub_transaction_[self].size ());
248- file_sub_transaction_[self].wait_all ();
248+ try {
249+ file_sub_transaction_[self].wait_all ();
250+ } catch (const simgrid::CancelException&) {
251+ if (!is_canceled ())
252+ throw ;
253+ file_sub_transaction_[self].clear ();
254+ transport->close_sub_files (self);
255+ transport->clear_to_read_in_transaction (self);
256+ sub_transaction_in_progress_ = false ;
257+ throw TransactionCanceledException (XBT_THROW_POINT );
258+ }
249259 if (is_transaction_canceled (current_sub_transaction_id_)) {
250260 file_sub_transaction_[self].clear ();
251261 transport->close_sub_files (self);
Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ void StagingEngine::begin_pub_transaction()
7777 current_pub_transaction_id_, current_sub_transaction_id_, get_pub_transaction ().size ());
7878 try {
7979 get_pub_transaction ().wait_all ();
80+ } catch (const simgrid::CancelException&) {
81+ if (!is_canceled ())
82+ throw ;
83+ get_pub_transaction ().clear ();
84+ throw TransactionCanceledException (XBT_THROW_POINT );
8085 } catch (const simgrid::NetworkFailureException&) {
8186 if (!is_canceled ())
8287 throw ;
You can’t perform that action at this time.
0 commit comments