akka/akka — pull request #1606 by rkuhn (2013-07-08 07:55:34+00:00)
Title: =act:3478 don’t fail constructor at end of hierarchy stress

This is what’s causing it:

* some Failures are dispensed which specify failConstr > 0, meaning that they will be put into the stateCache for later (re)starts
* immediately thereafter the Finishing state is entered and a large hierarchy reboot happens (failure of the “head”)
* last pings are handled by the few currently “known active” actors and state Stopping is soon entered
* the PingOfDeath is sent down the hierarchy to do the final checks and clean up
* meanwhile the tree rebuild reaches the actor which still has a constructor failure queued up from step 1
* this failure will be answered with Resume, no matter what it originally specified, because we are terminating after all
* if the failure originally was a Restart, then the actor will be confused in its postStop() checks
* BOOOM