Skip to content

Commit

Permalink
traverser: return during partial cancel when allocation exists
Browse files Browse the repository at this point in the history
Problem: issue #1284 identified a scenario where rabbits are not
released due to a traverser error during partial cancellation. The
traverser should skip the rest of the mod_plan function when an
allocation is found and mod_data.mod_type ==
job_modify_t::PARTIAL_CANCEL.

Add a goto statement to return 0 under this circumstance.
  • Loading branch information
milroy committed Sep 19, 2024
1 parent d11a3d5 commit 5203c6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resource/traversers/dfu_impl_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ int dfu_impl_t::mod_plan (vtx_t u, int64_t jobid, modify_data_t &mod_data)
span = alloc_span->second;
if (mod_data.mod_type != job_modify_t::PARTIAL_CANCEL) {
(*m_graph)[u].schedule.allocations.erase (alloc_span);
} else {
goto done;
}
} else if ((res_span = (*m_graph)[u].schedule.reservations.find (jobid))
!= (*m_graph)[u].schedule.reservations.end ()) {
Expand Down

0 comments on commit 5203c6c

Please sign in to comment.