You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/04/23 22:06:43 UTC

[PR] fix(test): pin minimum-runnable=-1 in ForkJoinExecutorConfiguratorSpec auto fixtures [pekko]

He-Pin opened a new pull request, #2894:
URL: https://github.com/apache/pekko/pull/2894

   ## Motivation
   
   The nightly build (run [24853126603](https://github.com/apache/pekko/actions/runs/24853126603/job/72758762338)) is red on the JDK 21 / Scala 2.13.x and JDK 25 jobs with two failures in `ForkJoinExecutorConfiguratorSpec`:
   
   ```
   - must keep the legacy value of 1 on JDK < 25 when the default is left untouched *** FAILED ***
     4 was not equal to 1 (ForkJoinExecutorConfiguratorSpec.scala:167)
   - must never drop below 1 even for parallelism = 1 dispatchers *** FAILED ***
   ```
   
   Both come from the same root cause introduced when the spec was added in #2890.
   
   ## Root cause
   
   The two `fj-auto-*` fixtures left `minimum-runnable` unset, expecting the reference.conf default (`-1`, which selects the JDK-aware auto policy). But the nightly workflow pins it via `-D` for JDK 21+ runs ([nightly-builds.yml](https://github.com/apache/pekko/blob/main/.github/workflows/nightly-builds.yml#L160-L162)) for stability:
   
   ```yaml
   if [ "${{ matrix.javaVersion }}" -ge 21 ]; then
     EXTRA_JVM_OPTS="-Dpekko.actor.default-dispatcher.fork-join-executor.minimum-runnable=4 ..."
   fi
   ```
   
   `Dispatchers.config(id)` resolves a dispatcher's config via:
   
   ```
   idConfig(id) → appConfig → nameConfig → defaultDispatcherConfig
   ```
   
   `defaultDispatcherConfig` carries the `pekko.actor.default-dispatcher` values, including any `-D` overrides. So when the spec's `fork-join-executor` block omits `minimum-runnable`, the fallback chain feeds the CI's pinned `4` into `config.getInt("minimum-runnable")` for the auto fixtures, and `resolveMinimumRunnable(4, _, _)` honours it verbatim → `4 != 1`.
   
   ## Modification
   
   Set `minimum-runnable = -1` explicitly in `fj-auto-default-dispatcher` and `fj-auto-small-dispatcher` so the spec always exercises the auto policy regardless of surrounding `-D` pins. The two `fj-explicit-*` fixtures already pin a value and remain unchanged.
   
   ## Result
   
   - Two failing nightly assertions go green again.
   - The CI `-D` pin keeps doing its production-stability job — only the spec is hardened.
   - Tested locally with `sbt actor-tests/testOnly org.apache.pekko.dispatch.ForkJoinExecutorConfiguratorSpec -Dpekko.actor.default-dispatcher.fork-join-executor.minimum-runnable=4` (reproduces the CI environment): all 11 tests pass (1 pending on JDK 25 as designed).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] fix(test): pin minimum-runnable=-1 in ForkJoinExecutorConfiguratorSpec auto fixtures [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #2894:
URL: https://github.com/apache/pekko/pull/2894


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org