Revert "update to Aeron 1.2.4, and fix the SharedMediaDriverSupport, #22693"

This reverts commit 3d0d50e98b.
This commit is contained in:
Patrik Nordwall 2017-04-12 07:38:02 +02:00
parent 41c756f169
commit 3b53daa370
2 changed files with 3 additions and 10 deletions

View file

@ -43,24 +43,17 @@ object SharedMediaDriverSupport {
.threadingMode(ThreadingMode.SHARED)
.sharedIdleStrategy(TaskRunner.createIdleStrategy(idleCpuLevel))
// concludeAeronDirectory needed for Aeron 1.2.4, otherwise NPE from isDriverActive
driverContext.concludeAeronDirectory()
// Check if the media driver is already started by another multi-node jvm.
// It checks more than one time with a sleep inbetween. The number of checks
// depends on the multi-node index (i).
@tailrec def isDriverInactive(i: Int): Boolean = {
if (i < 0) true
else {
val active = try driverContext.isDriverActive(5000, new Consumer[String] {
val active = driverContext.isDriverActive(5000, new Consumer[String] {
override def accept(msg: String): Unit = {
println(msg)
}
}) catch {
case NonFatal(e)
println(e.getMessage)
false
}
})
if (active) false
else {
Thread.sleep(500)

View file

@ -17,7 +17,7 @@ object Dependencies {
val sslConfigVersion = "0.2.1"
val slf4jVersion = "1.7.23"
val scalaXmlVersion = "1.0.6"
val aeronVersion = "1.2.4"
val aeronVersion = "1.2.3"
val Versions = Seq(
crossScalaVersions := Seq("2.11.8", "2.12.1"),