The GitHub Actions job "Binary Compatibility" on pekko.git/optimize-stage-actor-ref-lazy-dispatch has failed. Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run: 263c40a577cbfc35fa96662f9a03c61ade8a938c / He-Pin <[email protected]> fix: replace AtomicInteger with VarHandle and remove drainCallback in LazyDispatch Motivation: Per-instance AtomicInteger wrapper costs ~16 bytes per StageActor. Separate drainCallback lambda is an unnecessary allocation. Modification: - Replace AtomicInteger state field with @volatile var Int driven by static VarHandle in companion object (MethodHandles.privateLookupIn), same pattern as AbstractNodeQueue._tailDoNotCallMeDirectly. - LazyDispatch now extends Any => Unit directly, serving as both producer callback and drain callback, eliminating the drainCallback lambda allocation. - Remove private[this] (deprecated in Scala 3). Result: Each LazyDispatch instance saves ~16 bytes (AtomicInteger) + one lambda allocation (drainCallback). VarHandle lives on the companion object (true JVM static), shared across all instances. Tests: - sbt "stream / compile" "stream / mimaReportBinaryIssues" - sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.StageActorRefSpec" (11/11) Refs: #3035 Report URL: https://github.com/apache/pekko/actions/runs/26864037575 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
