Skip to content

Conversation

patriknw
Copy link
Contributor

  • missing for some error cases
  • in the states recoveryStarted and recovering it has got the permit and
    it must returned if the actor is stopped due to some error in those
    states
  • it would have been a lot easier to do such in postStop but we can't
    introduce new things in the trait Eventsourced due to BC

* missing for some error cases
* in the states recoveryStarted and recovering it has got the permit and
  it must returned if the actor is stopped due to some error in those
  states
* it would have been a lot easier to do such in postStop but we can't
  introduce new things in the trait Eventsourced due to BC
@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels Jan 29, 2018
@akka-ci
Copy link

akka-ci commented Jan 29, 2018

Test PASSed.


case RecoveryTick(true) ⇒
try onRecoveryFailure(
new RecoveryTimedOut(s"Recovery timed out, didn't get snapshot within $timeout"),
event = None)
finally context.stop(self)
returnRecoveryPermit()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should those be in the finally blocks? in case a class implements onRecoveryFailure and ends up throwing for some reason, we still want to return the token.

Great catch btw, I'll make sure to have those covered in the typed one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a catch surrounding the whole message processing that will handle that case. In typed I assume this will be a lot easier because we don't have the restriction of not being able to introduce new state variables as we have in the Eventsourced trait.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good, yeah indeed somewhat messy. Thanks!

@ktoso ktoso merged commit cdecd8b into master Jan 30, 2018
@ktoso ktoso deleted the wip-more-returnRecoveryPermit-patriknw branch January 30, 2018 12:46
@ktoso ktoso added this to the 2.5.10 milestone Jan 30, 2018
manonthegithub pushed a commit to manonthegithub/akka that referenced this pull request Jan 31, 2018
* missing for some error cases
* in the states recoveryStarted and recovering it has got the permit and
  it must returned if the actor is stopped due to some error in those
  states
* it would have been a lot easier to do such in postStop but we can't
  introduce new things in the trait Eventsourced due to BC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants