-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Follow up on the discussion started at https://github.com/wildfly/wildfly-core/pull/6410#issuecomment-2840291702
ParallelBootOperationContext makes invocations on the primaryContext that assume that the primaryContext is executing a step whose address is the empty address. This is a correct assumption during normal operation execution, as the parallel boot ops are executing under the control of ParallelBootOperationStepHandler, which executes against the root resource.
But during execution of a ResultHandler (e.g. during rollback), the assumption is incorrect; when a ResultHandler executes the active step is whatever one triggered execution of the ResultHandlers, e.g. the one that triggered rollback in the case of a failed op, or the final step in the case of a success.
See AbstractOperationContext.executeResultHandlerPhase() and AbstractOperationContext$Step.finalizeStep(Throwable). The former method invokes finalizeStep for whatever step was running. The later walks the chain of steps invoking their finalizeStep(), without changing activeStep.
So, the PBOC invocations of the primaryContext need to be reconsidered.
Note that calling some PBOC methods is likely illegal or at least wrong in this ResultHandler context; e.g. rollback works by reverting the Resource tree to a previous state, so methods to manipulate it in a ResultHandler are wrong. For such methods "fixing" PBOC is not needed, beyond perhaps a code comment noting why the ResultHandler case is not relevant and simply calling the primary handler with an assumption that its current address is the empty address is ok.
- relates to
-
WFCORE-7234 ParallelBootOperationContext.getResourceRegistration() can throw OperationFailedRuntimeException during operation rollback
-
- Resolved
-