Skip to content

Commit

Permalink
Fix the last result-pruning fix
Browse files Browse the repository at this point in the history
We cannot call cleanupResult on operation result that is not closed yet!

Related to MID-7830.
  • Loading branch information
mederly committed Apr 6, 2022
1 parent 1e429f8 commit ad2dfc1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ private void doRun(OperationResult result)
*/
private void pruneResult(OperationResult result) {
try {
result.cleanupResultDeeply();
// We cannot clean up the current (root) result, as it is not closed yet. So we do that on subresults.
// (This means that minor subresult of the current root result will survive, but let's them be.
// Hopefully they will be eliminated later e.g. when the result is finally stored into the task.)
result.getSubresults().forEach(
OperationResult::cleanupResultDeeply);
} catch (Exception e) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't clean up the operation result in {}", e, this);
}
Expand Down

0 comments on commit ad2dfc1

Please sign in to comment.