Skip to content

Commit

Permalink
try to add config
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Dec 4, 2024
1 parent 9746106 commit 3837aea
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
5 changes: 5 additions & 0 deletions remote/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,11 @@ pekko {
# limit there will be extra performance and scalability cost.
log-frame-size-exceeding = off

# If set to "on", InboundQuarantineCheck will propagate harmless quarantine events.
# This is the legacy behavior. Users who see these harmless quarantine events lead
# to problems can set this to "off" to suppress them (https://github.com/apache/pekko/pull/1555).
propagate-harmless-quarantine-events = on

advanced {

# Maximum serialized message size, including header data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ private[pekko] final class ArterySettings private (config: Config) {
*/
val Version: Byte = ArteryTransport.HighestVersion

/**
* If set to true, harmless quarantine events are propagated in InboundQuarantineCheck.
* Background is in https://github.com/apache/pekko/pull/1555
*/
val PropagateHarmlessQuarantineEvents: Boolean =
getBoolean("propagate-harmless-quarantine-events")

object Advanced {
val config: Config = getConfig("advanced")
import config._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ private[remote] class InboundQuarantineCheck(inboundContext: InboundContext)
env.association match {
case OptionVal.Some(association) =>
if (association.associationState.isQuarantined(env.originUid)) {
if (association.associationState.quarantinedButHarmless(env.originUid)) {
if (!inboundContext.settings.PropagateHarmlessQuarantineEvents
&& association.associationState.quarantinedButHarmless(env.originUid)) {
log.info(
"Message [{}] from [{}#{}] was dropped. " +
"The system is quarantined but the UID is known to be harmless.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ import pekko.testkit.TestProbe

class OutboundIdleShutdownSpec extends ArteryMultiNodeSpec(s"""
pekko.loglevel=INFO
pekko.remote.artery.advanced.stop-idle-outbound-after = 1 s
pekko.remote.artery.advanced.connection-timeout = 2 s
pekko.remote.artery.advanced.remove-quarantined-association-after = 1 s
pekko.remote.artery.advanced.compression {
actor-refs.advertisement-interval = 5 seconds
pekko.remote.artery.propagate-harmless-quarantine-events = off
pekko.remote.artery.advanced {
stop-idle-outbound-after = 1 s
connection-timeout = 2 s
remove-quarantined-association-after = 1 s
compression {
actor-refs.advertisement-interval = 5 seconds
}
}
""") with ImplicitSender with Eventually {

Expand Down

0 comments on commit 3837aea

Please sign in to comment.