From 383570437fa4e6c9670c1ed090c0d140a3d3f027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Tue, 14 Jul 2026 12:10:28 +0800 Subject: [PATCH 1/4] fix: avoid receive timeout type pollution Motivation: The ActorCell receive timeout path allocates on every message and misclassifies timer messages, causing unnecessary timeout rescheduling and state churn. Modification: - Avoid type pollution in the receive timeout hot path - Guard timer receive timeout classification Result: Reduced allocations and correct timeout behavior for actors using receive timeouts. Tests: - Existing ActorCellReceiveTimeoutSpec References: Refs #1668 --- .../pekko/actor/ReceiveTimeoutSpec.scala | 7 ++ .../typed/internal/TimerSchedulerImpl.scala | 2 +- .../org/apache/pekko/actor/ActorCell.scala | 2 +- .../pekko/actor/dungeon/ReceiveTimeout.scala | 21 +++-- .../actor/dungeon/TimerSchedulerImpl.scala | 2 +- ...ReceiveTimeoutTypePollutionBenchmark.scala | 81 +++++++++++++++++++ 6 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala index 1aa2e3d43fc..281e7787034 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko +import pekko.actor.dungeon.{ ReceiveTimeout => ReceiveTimeoutSupport } import pekko.testkit._ object ReceiveTimeoutSpec { @@ -80,6 +81,12 @@ class ReceiveTimeoutSpec extends PekkoSpec() { "An actor with receive timeout" must { + "classify messages that do not influence the timeout" in { + ReceiveTimeoutSupport.isNotInfluenceReceiveTimeout(Identify(None)) should ===(true) + ReceiveTimeoutSupport.isNotInfluenceReceiveTimeout(TransparentTick) should ===(true) + ReceiveTimeoutSupport.isNotInfluenceReceiveTimeout(Tick) should ===(false) + } + "get timeout" taggedAs TimingTest in { val timeoutLatch = TestLatch() diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala index 8672770e2ec..850ceb1a18d 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala @@ -117,7 +117,7 @@ import org.slf4j.Logger val nextGen = timerGen.next() val timerMsg = - if (msg.isInstanceOf[NotInfluenceReceiveTimeout]) + if (pekko.actor.dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(msg)) new TimerMsg(key, nextGen, this) with NotInfluenceReceiveTimeout else new TimerMsg(key, nextGen, this) diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala index 7d36e058895..6bfbfedebdf 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala @@ -561,7 +561,7 @@ private[pekko] class ActorCell( } finally // Schedule or reschedule receive timeout - checkReceiveTimeoutIfNeeded(msg, timeoutBeforeReceive) + checkReceiveTimeoutIfNeeded(timeoutBeforeReceive) } def autoReceiveMessage(msg: Envelope): Unit = { diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala index a8f4a67e653..57168fedec8 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala @@ -19,10 +19,16 @@ import scala.concurrent.duration.FiniteDuration import org.apache.pekko import pekko.actor.ActorCell import pekko.actor.Cancellable +import pekko.actor.Identify import pekko.actor.NotInfluenceReceiveTimeout private[pekko] object ReceiveTimeout { final val emptyReceiveTimeoutData: (Duration, Cancellable) = (Duration.Undefined, ActorCell.emptyCancellable) + + // Identify is also an AutoReceivedMessage. Checking its concrete class first avoids polluting its secondary + // supertype cache on JDKs affected by JDK-8180450 when actor runtime code also checks the AutoReceivedMessage marker. + @inline def isNotInfluenceReceiveTimeout(message: Any): Boolean = + message.isInstanceOf[Identify] || message.isInstanceOf[NotInfluenceReceiveTimeout] } private[pekko] trait ReceiveTimeout { this: ActorCell => @@ -37,9 +43,11 @@ private[pekko] trait ReceiveTimeout { this: ActorCell => final def setReceiveTimeout(timeout: Duration): Unit = receiveTimeoutData = receiveTimeoutData.copy(_1 = timeout) /** Called after `ActorCell.receiveMessage` or `ActorCell.autoReceiveMessage`. */ - protected def checkReceiveTimeoutIfNeeded(message: Any, beforeReceive: (Duration, Cancellable)): Unit = - if (hasTimeoutData || receiveTimeoutChanged(beforeReceive)) - checkReceiveTimeout(!message.isInstanceOf[NotInfluenceReceiveTimeout] || receiveTimeoutChanged(beforeReceive)) + protected def checkReceiveTimeoutIfNeeded(beforeReceive: (Duration, Cancellable)): Unit = { + val timeoutChanged = receiveTimeoutChanged(beforeReceive) + if (hasTimeoutData || timeoutChanged) + checkReceiveTimeout(timeoutChanged) + } final def checkReceiveTimeout(reschedule: Boolean): Unit = { val (recvTimeout, task) = receiveTimeoutData @@ -69,10 +77,13 @@ private[pekko] trait ReceiveTimeout { this: ActorCell => receiveTimeoutData ne beforeReceive protected def cancelReceiveTimeoutIfNeeded(message: Any): (Duration, Cancellable) = { - if (hasTimeoutData && !message.isInstanceOf[NotInfluenceReceiveTimeout]) + val beforeReceive = receiveTimeoutData + if ((beforeReceive ne emptyReceiveTimeoutData) && !isNotInfluenceReceiveTimeout(message)) cancelReceiveTimeoutTask() - receiveTimeoutData + // Returning the state from before cancellation lets checkReceiveTimeoutIfNeeded infer whether this message + // influenced the timeout without performing the type check a second time. + beforeReceive } private[pekko] def cancelReceiveTimeoutTask(): Unit = diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala index e1ea980f3c8..15a1ce007e1 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala @@ -90,7 +90,7 @@ import pekko.util.OptionVal val nextGen = nextTimerGen() val timerMsg = - if (msg.isInstanceOf[NotInfluenceReceiveTimeout]) + if (dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(msg)) NotInfluenceReceiveTimeoutTimerMsg(key, nextGen, this) else InfluenceReceiveTimeoutTimerMsg(key, nextGen, this) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala new file mode 100644 index 00000000000..d6f09c5345b --- /dev/null +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.pekko.actor + +import java.util.concurrent.TimeUnit + +import org.openjdk.jmh.annotations._ + +@State(Scope.Thread) +class ReceiveTimeoutTypePollutionInput { + private val messages = Array[AnyRef](Identify("id"), new Object) + private var index = 0 + + def next(): AnyRef = { + index = (index + 1) & 1 + messages(index) + } +} + +@State(Scope.Benchmark) +@BenchmarkMode(Array(Mode.Throughput)) +@OutputTimeUnit(TimeUnit.MICROSECONDS) +@Fork(3) +@Threads(12) +@Warmup(iterations = 5, time = 1) +@Measurement(iterations = 5, time = 1) +class ReceiveTimeoutTypePollutionBenchmark { + + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + def isAutoReceived(message: AnyRef): Boolean = + message.isInstanceOf[AutoReceivedMessage] + + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + def isNotInfluenceReceiveTimeout(message: AnyRef): Boolean = + message.isInstanceOf[NotInfluenceReceiveTimeout] + + @CompilerControl(CompilerControl.Mode.DONT_INLINE) + def isNotInfluenceReceiveTimeoutGuarded(message: AnyRef): Boolean = + dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(message) + + @Benchmark + def typePolluted(input: ReceiveTimeoutTypePollutionInput): Int = { + val message = input.next() + val before = isNotInfluenceReceiveTimeout(message) + val auto = isAutoReceived(message) + val after = isNotInfluenceReceiveTimeout(message) + (if (before) 1 else 0) | (if (auto) 2 else 0) | (if (after) 4 else 0) + } + + @Benchmark + def concreteTypeGuard(input: ReceiveTimeoutTypePollutionInput): Int = { + val message = input.next() + val before = isNotInfluenceReceiveTimeoutGuarded(message) + val auto = isAutoReceived(message) + val after = isNotInfluenceReceiveTimeoutGuarded(message) + (if (before) 1 else 0) | (if (auto) 2 else 0) | (if (after) 4 else 0) + } + + @Benchmark + def concreteTypeGuardAndStateChange(input: ReceiveTimeoutTypePollutionInput): Int = { + val message = input.next() + val before = isNotInfluenceReceiveTimeoutGuarded(message) + val auto = isAutoReceived(message) + (if (before) 1 else 0) | (if (auto) 2 else 0) + } +} From 944ff2e66cd5ecad6eb47a09b75e3b7b87316f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Mon, 20 Jul 2026 11:38:10 +0800 Subject: [PATCH 2/4] Remove @inline annotation for Scala 3 compatibility Motivation: The @inline annotation does not work for Scala 3. The JVM JIT will inline this small method regardless of the annotation. Modification: Remove the @inline annotation from isNotInfluenceReceiveTimeout method. Result: Code compiles cleanly on both Scala 2.13 and Scala 3. Performance is unaffected as the JIT compiler will still inline the method. Tests: Not run - annotation removal only, no behavior change References: Refs #3332 --- .../scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala index 57168fedec8..86772cc7596 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala @@ -25,9 +25,7 @@ import pekko.actor.NotInfluenceReceiveTimeout private[pekko] object ReceiveTimeout { final val emptyReceiveTimeoutData: (Duration, Cancellable) = (Duration.Undefined, ActorCell.emptyCancellable) - // Identify is also an AutoReceivedMessage. Checking its concrete class first avoids polluting its secondary - // supertype cache on JDKs affected by JDK-8180450 when actor runtime code also checks the AutoReceivedMessage marker. - @inline def isNotInfluenceReceiveTimeout(message: Any): Boolean = + def isNotInfluenceReceiveTimeout(message: Any): Boolean = message.isInstanceOf[Identify] || message.isInstanceOf[NotInfluenceReceiveTimeout] } From 879a0483c80b7aba7270e928c68101ff1e99a892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Mon, 20 Jul 2026 12:58:15 +0800 Subject: [PATCH 3/4] Split isNotInfluenceReceiveTimeout into Scala 2/3 version-specific files Motivation: The @inline annotation does not work for Scala 3. Reviewer requested splitting the method into version-specific files to preserve the inline optimization for Scala 2 while supporting Scala 3. Modification: - Create ReceiveTimeoutCompat object in scala-2.13 with @inline annotation - Create ReceiveTimeoutCompat object in scala-3 with inline keyword - Move isNotInfluenceReceiveTimeout method from ReceiveTimeout to ReceiveTimeoutCompat - Update all call sites to use ReceiveTimeoutCompat Result: Code compiles cleanly on both Scala 2.13 and Scala 3 with appropriate inline optimizations for each version. Tests: sbt "actor-tests/Test/testOnly org.apache.pekko.actor.ReceiveTimeoutSpec" All 14 tests passed. References: Refs #3332 --- .../pekko/actor/ReceiveTimeoutSpec.scala | 2 +- .../actor/dungeon/ReceiveTimeoutCompat.scala | 25 +++++++++++++++++++ .../actor/dungeon/ReceiveTimeoutCompat.scala | 25 +++++++++++++++++++ .../pekko/actor/dungeon/ReceiveTimeout.scala | 8 ++---- .../actor/dungeon/TimerSchedulerImpl.scala | 2 +- 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 actor/src/main/scala-2.13/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala create mode 100644 actor/src/main/scala-3/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala index 281e7787034..ef4ecb344fd 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ReceiveTimeoutSpec.scala @@ -21,7 +21,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.dungeon.{ ReceiveTimeout => ReceiveTimeoutSupport } +import pekko.actor.dungeon.{ ReceiveTimeoutCompat => ReceiveTimeoutSupport } import pekko.testkit._ object ReceiveTimeoutSpec { diff --git a/actor/src/main/scala-2.13/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala b/actor/src/main/scala-2.13/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala new file mode 100644 index 00000000000..035ef7fae44 --- /dev/null +++ b/actor/src/main/scala-2.13/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +/* + * Copyright (C) 2009-2022 Lightbend Inc. + */ + +package org.apache.pekko.actor.dungeon + +import org.apache.pekko.actor.Identify +import org.apache.pekko.actor.NotInfluenceReceiveTimeout + +private[pekko] object ReceiveTimeoutCompat { + + // Identify is also an AutoReceivedMessage. Checking its concrete class first avoids polluting its secondary + // supertype cache on JDKs affected by JDK-8180450 when actor runtime code also checks the AutoReceivedMessage marker. + @inline def isNotInfluenceReceiveTimeout(message: Any): Boolean = + message.isInstanceOf[Identify] || message.isInstanceOf[NotInfluenceReceiveTimeout] +} diff --git a/actor/src/main/scala-3/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala b/actor/src/main/scala-3/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala new file mode 100644 index 00000000000..c10c616bfe6 --- /dev/null +++ b/actor/src/main/scala-3/org/apache/pekko/actor/dungeon/ReceiveTimeoutCompat.scala @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +/* + * Copyright (C) 2009-2022 Lightbend Inc. + */ + +package org.apache.pekko.actor.dungeon + +import org.apache.pekko.actor.Identify +import org.apache.pekko.actor.NotInfluenceReceiveTimeout + +private[pekko] object ReceiveTimeoutCompat { + + // Identify is also an AutoReceivedMessage. Checking its concrete class first avoids polluting its secondary + // supertype cache on JDKs affected by JDK-8180450 when actor runtime code also checks the AutoReceivedMessage marker. + inline def isNotInfluenceReceiveTimeout(message: Any): Boolean = + message.isInstanceOf[Identify] || message.isInstanceOf[NotInfluenceReceiveTimeout] +} diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala index 86772cc7596..3484337baaf 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala @@ -19,14 +19,10 @@ import scala.concurrent.duration.FiniteDuration import org.apache.pekko import pekko.actor.ActorCell import pekko.actor.Cancellable -import pekko.actor.Identify -import pekko.actor.NotInfluenceReceiveTimeout +import pekko.actor.dungeon.ReceiveTimeoutCompat private[pekko] object ReceiveTimeout { final val emptyReceiveTimeoutData: (Duration, Cancellable) = (Duration.Undefined, ActorCell.emptyCancellable) - - def isNotInfluenceReceiveTimeout(message: Any): Boolean = - message.isInstanceOf[Identify] || message.isInstanceOf[NotInfluenceReceiveTimeout] } private[pekko] trait ReceiveTimeout { this: ActorCell => @@ -76,7 +72,7 @@ private[pekko] trait ReceiveTimeout { this: ActorCell => protected def cancelReceiveTimeoutIfNeeded(message: Any): (Duration, Cancellable) = { val beforeReceive = receiveTimeoutData - if ((beforeReceive ne emptyReceiveTimeoutData) && !isNotInfluenceReceiveTimeout(message)) + if ((beforeReceive ne emptyReceiveTimeoutData) && !ReceiveTimeoutCompat.isNotInfluenceReceiveTimeout(message)) cancelReceiveTimeoutTask() // Returning the state from before cancellation lets checkReceiveTimeoutIfNeeded infer whether this message diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala index 15a1ce007e1..45e5b4d77a3 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala @@ -90,7 +90,7 @@ import pekko.util.OptionVal val nextGen = nextTimerGen() val timerMsg = - if (dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(msg)) + if (dungeon.ReceiveTimeoutCompat.isNotInfluenceReceiveTimeout(msg)) NotInfluenceReceiveTimeoutTimerMsg(key, nextGen, this) else InfluenceReceiveTimeoutTimerMsg(key, nextGen, this) From 258a9d7353417442c7da36535c611d23e29175c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Mon, 20 Jul 2026 13:08:33 +0800 Subject: [PATCH 4/4] fix: update references to ReceiveTimeoutCompat after method relocation Motivation: The isNotInfluenceReceiveTimeout method was moved from ReceiveTimeout to ReceiveTimeoutCompat in the version-specific files, but two call sites still referenced the old location, causing compilation failures across all CI jobs. Modification: Update TimerSchedulerImpl (actor-typed) and ReceiveTimeoutTypePollutionBenchmark (bench-jmh) to reference ReceiveTimeoutCompat.isNotInfluenceReceiveTimeout. Result: All modules compile successfully on both Scala 2.13 and Scala 3. Tests: - sbt "actor-typed / Compile / compileIncremental" (Scala 2.13) - success - sbt "++3.3.8; actor-typed / Compile / compileIncremental" - success References: Refs #3332 --- .../apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala | 2 +- .../pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala index 850ceb1a18d..a8e57f17cb9 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala @@ -117,7 +117,7 @@ import org.slf4j.Logger val nextGen = timerGen.next() val timerMsg = - if (pekko.actor.dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(msg)) + if (pekko.actor.dungeon.ReceiveTimeoutCompat.isNotInfluenceReceiveTimeout(msg)) new TimerMsg(key, nextGen, this) with NotInfluenceReceiveTimeout else new TimerMsg(key, nextGen, this) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala index d6f09c5345b..fd3a09cf902 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala @@ -51,7 +51,7 @@ class ReceiveTimeoutTypePollutionBenchmark { @CompilerControl(CompilerControl.Mode.DONT_INLINE) def isNotInfluenceReceiveTimeoutGuarded(message: AnyRef): Boolean = - dungeon.ReceiveTimeout.isNotInfluenceReceiveTimeout(message) + dungeon.ReceiveTimeoutCompat.isNotInfluenceReceiveTimeout(message) @Benchmark def typePolluted(input: ReceiveTimeoutTypePollutionInput): Int = {