Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ignasi35
Copy link
Member

@ignasi35 ignasi35 commented Dec 11, 2017

Akka 2.5.8 introduced the Reason argument on the CoordinatedShutdown API so CS users can distinguish the actual trigger of the shutdown process.

Akka 2.5.8 also introduced the jvm-shutdown-hooks setting to make sure there's a single responsible for registering JVM shutdown hooks. This setting should be disabled on Play's 2.6.x branch.

  • Play users that embed an Akka Cluster node inside the play application and use Artery will have to register the Artery shutdown manually. This need documentation. Artery is shutdown when the actor system is terminated which play will take care of.

@ignasi35
Copy link
Member Author

Hmm, build fails on validate-code.

The fix for that issue is on #8088

@marcospereira
Copy link
Member

@ignasi35 #8088 merged.

@ignasi35
Copy link
Member Author

Thanks @marcospereira!

I've updated the PR description: there's nothing left for this PR. We can relaunch the build and merge if it passes.

@ignasi35 ignasi35 changed the title Use Akka's Reason when shutting down and disable Artery Use Akka's Reason when shutting down and disable Akka JVM hooks globally Dec 12, 2017
@ignasi35
Copy link
Member Author

ignasi35 commented Dec 13, 2017

Meh, it now failed on mima. I'll rebase on top of master the HEAD of 2.6.x. See #8088

@ignasi35 ignasi35 force-pushed the shutdown-setup-post-akka-2.5.8 branch from 35400a5 to 3e66647 Compare December 13, 2017 18:33

import javax.inject.{ Inject, Provider, Singleton }

import akka.actor.CoordinatedShutdown.ClusterDowningReason
Copy link
Member

Choose a reason for hiding this comment

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

Is this import needed?

} finally {
CoordinatedShutdown(actorSystem).run()
// On testing, use any reason
CoordinatedShutdown(actorSystem).run(JvmExitReason)
Copy link
Member

Choose a reason for hiding this comment

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

It probably doesn't matter for now but since we're not actually killing the jvm it would make more sense to use ApplicationShutdownReason. Not sure if there is or could be special handling for the jvm exit case.

Choose a reason for hiding this comment

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

Should it just invoke the returned stopHook?

@gmethvin gmethvin merged commit 0862e24 into playframework:2.6.x Dec 19, 2017
gmethvin pushed a commit to gmethvin/playframework that referenced this pull request Dec 19, 2017
…lly (playframework#8087)

* Use Akka's Reason when shutting down and disable Artery

* Organize imports of Akka.scala

* Run the stopHook after ActorSystemProviderSpec
@TimMoore TimMoore deleted the shutdown-setup-post-akka-2.5.8 branch December 19, 2017 06:25
gmethvin added a commit that referenced this pull request Dec 19, 2017
…lly (#8087) (#8106)

* Use Akka's Reason when shutting down and disable Artery

* Organize imports of Akka.scala

* Run the stopHook after ActorSystemProviderSpec
@marcospereira marcospereira added this to the Play 2.6.10 milestone Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants