Skip to content

docs: fix outdated content and wrong config keys and API names - #3583

Merged
He-Pin merged 7 commits into
apache:mainfrom
pjfanning:docs-outdated-for-2.0
Oct 9, 2026
Merged

He-Pin merged 7 commits into
apache:mainfrom
pjfanning:docs-outdated-for-2.0

Conversation

@pjfanning

@pjfanning pjfanning commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Motivation

A review of the docs found statements that are out of date for Pekko 2.0 (JDK 8 advice, removed features described as current, old build tool versions and syntax, deprecated APIs presented as the main approach) and config keys, class names and method names that do not exist and would fail if copied.

Modification

Outdated for 2.0

  • split-brain-resolver.md: auto-down described as removed, not as an opt-in feature
  • cluster-usage.md: pekko-cluster script "may be removed in a future release"; explain where jmxsh-R5.jar comes from (the script downloads it); JDK 17 JMX link
  • io-dns.md: async-dns "may become the default in a future release"
  • common/binary-compatibility-rules.md, common/may-change.md: removed 1.1.0 / Java 8 wording
  • additional/deploying.md: replace the removed UseCGroupMemoryLimitForHeap flag with container-support / MaxRAMPercentage guidance
  • additional/packaging.md: sbt 1.13.0, com.github.sbt sbt-native-packager 1.13.0, maven-shade 3.6.2, heading matches content; Gradle snippets moved to com.gradleup.shadow 9.6.1 (rewritten because the old Kotlin snippet no longer compiles against Shadow 9 — not tried in a Gradle build, reviewers familiar with Shadow please check)
  • project/immutable.md: Lombok 1.18.48 (1.18.10 does not run on JDK 16+)
  • general/configuration.md: lightbend/config links; JDK 17 REPL banner
  • dispatchers.md, typed/dispatchers.md: drop "Java 9+" qualifier; JDK 17 javadoc links
  • multi-jvm-testing.md, multi-node-testing.md: sbt slash syntax, Scala 3 compatible main, JDK 17/21 paths
  • persistence.md, persistence-plugins.md: LevelDB 0.12, document both native and Java-port dependencies
  • remoting.md: Props.create; supervision-classic.md: no Akka version, whenTerminated; testing.md: Pekko not Akka 2.x
  • io-udp.md: drop SecurityManager note; coordinated-shutdown.md: drop pre-fork issue link; distributed-pub-sub.md: drop dead Activator link
  • discovery/index.md: remove the "Migrating from Pekko Management Discovery (before 1.0.0)" section (no such pre-1.0 release existed)
  • fault-tolerance.md: Java text matches Duration.ofMinutes snippet
  • typed/cluster-sharding.md: drop -2.3 flag from the remove-internal-data example; typed/actors.md: correct Java pattern matching versions
  • stream docs: MaterializedMap, flatMap note and mapConcat signatures (IterableOnce / java.lang.Iterable), stale "stub" notes, SI-2712/Dotty text, Source.queue prose rewritten for BoundedSourceQueue (deprecated overloads moved to a note), PubSub.source/sink headings, TestSink()/TestSource() instead of removed probe, Source.actorRef completion via completionMatcher, Sink.collection uses scala.collection.Factory, ActorFlow ask timeout is java.util.concurrent.TimeoutException, real description for javaCollectorParallelUnordered

Wrong config keys

  • persistence-plugins.md: auto-start-journals / auto-start-snapshot-stores take config paths
  • remoting.md: pekko.remote.classic.retry-gate-closed-for; multi-jvm-testing.md: pekko.remote.artery.canonical.port and a real multi-jvm test name
  • typed/cluster.md: pekko.cluster.failure-detector.implementation-class, new Down(address)
  • remoting-artery.md: pekko.remote.artery.advanced.aeron.aeron-dir
  • cluster-client.md, cluster-metrics.md: pekko.actor.provider, fully qualified extension class names
  • typed/cluster-concepts.md: monitored by up to 9 nodes; typed/persistence.md: stash-capacity default 4096 and overflow strategy
  • additional/operations.md: JMX MBean pekko:type=Cluster
  • stream/operators/Source-or-Flow/mapWithResource.md, stream/operators/StreamConverters/fromOutputStream.md: pekko.stream.materializer.blocking-io-dispatcher (no org.apache. prefix); these operators are a Flow and a Sink, not a Source

Wrong API names

  • ProducerController, ShardRegion.CurrentShardRegionState, extractShardId, BackoffOnStopOptions/BackoffOnFailureOptions, Replicator.DeleteFailure/StoreFailure, no RefreshInterval hint, org.apache.pekko.actor.typed.ActorSystem, pekko-cluster-typed artifact for singleton, Pekko Projections has its own version, Compression.inflate, RunnableGraph.fromGraph / BidiFlow in stream composition

Other wrong facts

  • remoting.md: classic remoting needs netty-transport + netty-handler (not the Netty 3 netty artifact)
  • cluster-metrics.md: moving average is set by pekko.cluster.metrics.collector.moving-average-half-life
  • routing.md: fork-join-executor; split-brain-resolver.md: stable-after, keep-majority described above
  • logging.md: dead letter logging during shutdown is off by default; persistence-schema-evolution.md: Java serialization is disabled by default
  • fsm.md: UnsubscribeTransitionCallBack; testing.md: ignoreNoMsg, int, duplicated sentence removed
  • persistence-query.md: getReadJournalFor, Offset, newer events, title, ReadJournalProvider label; io-udp.md: Udp.Bind
  • includes/cluster.md: remembered entities; discovery/index.md: _service._tcp.pekko.test; general/addressing.md: root down
  • project/downstream-upgrade-strategy.md: patch example 1.1.1; common/circuitbreaker.md: not an actor, CompletionStage
  • typed/dispatchers.md: org.apache.pekko.dispatch.ExecutorServiceConfigurator; ExtensionDocSpec.scala snippet (used by typed/extending.md): real DatabasePool class name
  • typed/guide/tutorial_1.md: typed tell takes one argument; typed/durable-state/persistence.md: DurableStateBehavior names, state not events
  • typed/mailboxes.md: fromConfig selects a mailbox, classic ActorSystem.Settings; typed/routers.md: preferLocalRoutees only for group routers
  • typed/interaction-patterns.md: typed TimerScheduler links and startTimer* names, askWithStatus links ActorContext, Java StatusReply.ack() link uses StatusReply#ack()
  • stream/operators/StreamConverters/fromOutputStream.md: the IOResult carries the number of bytes written, not a file size; typed/replicated-eventsourcing-auction.md: WinnerDecided, Finish

Each change was checked against the source, reference.conf or build files in this repo.

Not included (source changes, can follow separately): the Scaladoc of RemoveInternalClusterShardingData still documents -2.3, the Cluster.scala warning still says "auto-down has been removed in Akka 2.6.0", and the Sink.collection Scaladoc still mentions CanBuildFrom.

Result

The docs match the 2.0 code, and copied config keys and API names work.

Tests

  • Not run - docs only (plus a string literal in the ExtensionDocSpec.scala doc snippet)

References

None - found during a review of the docs

@pjfanning pjfanning added this to the 2.0.0-M5 milestone Oct 8, 2026
pjfanning added a commit to pjfanning/incubator-pekko that referenced this pull request Oct 8, 2026
…efaults

Motivation:
More docs give wrong config keys, a wrong artifact name or wrong
default values.

Modification:
- mapWithResource.md, fromOutputStream.md: the blocking dispatcher key
  is pekko.stream.materializer.blocking-io-dispatcher (no org.apache.
  prefix); these operators are a Flow and a Sink, not a Source
- typed/guide/modules.md: typed Cluster Singleton ships in
  pekko-cluster-typed; there is no pekko-cluster-singleton artifact
- typed/cluster-concepts.md: monitored by up to 9 nodes by default
  (monitored-by-nr-of-members = 9)
- typed/persistence.md: stash-capacity defaults to 4096 (10000 is an
  example) and commands are only dropped with the default
  stash-overflow-strategy = "drop"

Result:
Copied keys, artifact names and stated defaults match 1.7.x.

Tests:
- Not run - docs only; checked against the 1.7.x reference.conf files
  and build

References:
Refs apache#3583
pjfanning added a commit to pjfanning/incubator-pekko that referenced this pull request Oct 8, 2026
Motivation:
apache#3583 fixes the neighbouring line in discovery/index.md; fixing line
238 here would conflict with it.

Modification:
Drop the line 238 typo fix from this PR; apache#3583 fixes it together with
line 239.

Result:
This PR and apache#3583 merge cleanly.

Tests:
- Not run - docs only

References:
Refs apache#3583
He-Pin pushed a commit that referenced this pull request Oct 9, 2026
…efaults (#3586)

* docs: fix wrong config keys and class names in config examples

Motivation:
Several config examples and setting names in the docs use keys or
class names that do not exist, so copying them has no effect or fails.

Modification:
- persistence-plugins.md: auto-start-journals and
  auto-start-snapshot-stores take plugin config paths
  (pekko.persistence.journal.leveldb,
  pekko.persistence.snapshot-store.local), not class-style names
- remoting.md: pekko.remote.classic.retry-gate-closed-for
- multi-jvm-testing.md: -Dpekko.remote.artery.canonical.port instead
  of the non-existent pekko.remote.port
- typed/cluster.md: pekko.cluster.failure-detector.implementation-class
- remoting-artery.md: pekko.remote.artery.advanced.aeron.aeron-dir
- cluster-client.md: pekko.actor.provider; fully qualified
  org.apache.pekko.cluster.client.ClusterClientReceptionist extension
- cluster-metrics.md: fully qualified
  org.apache.pekko.cluster.metrics.ClusterMetricsExtension extension

Result:
Config copied from these examples works.

Tests:
- Not run - docs only; each key and class name checked against the
  1.7.x reference.conf files and sources

References:
Refs #3583 (subset of the config key and class name fixes)

* docs: fix blocking-io-dispatcher key, singleton artifact and stated defaults

Motivation:
More docs give wrong config keys, a wrong artifact name or wrong
default values.

Modification:
- mapWithResource.md, fromOutputStream.md: the blocking dispatcher key
  is pekko.stream.materializer.blocking-io-dispatcher (no org.apache.
  prefix); these operators are a Flow and a Sink, not a Source
- typed/guide/modules.md: typed Cluster Singleton ships in
  pekko-cluster-typed; there is no pekko-cluster-singleton artifact
- typed/cluster-concepts.md: monitored by up to 9 nodes by default
  (monitored-by-nr-of-members = 9)
- typed/persistence.md: stash-capacity defaults to 4096 (10000 is an
  example) and commands are only dropped with the default
  stash-overflow-strategy = "drop"

Result:
Copied keys, artifact names and stated defaults match 1.7.x.

Tests:
- Not run - docs only; checked against the 1.7.x reference.conf files
  and build

References:
Refs #3583
He-Pin pushed a commit that referenced this pull request Oct 9, 2026
* docs: fix typos and grammar

Motivation:
A review of the docs found many typos, grammar mistakes and stray
markup characters.

Modification:
Fix typos, grammar, stray backticks/brackets/asterisks, wrong labels
in link text, a duplicated snippet block and an H1 heading in the
middle of a page, across the top-level, common, additional, general,
project, discovery, durable-state, includes, typed and stream docs.
No facts or link targets are changed.

Result:
The docs read correctly.

Tests:
- Not run - docs only

References:
None - found during a review of the docs

* docs: leave discovery/index.md line 238 to #3583

Motivation:
#3583 fixes the neighbouring line in discovery/index.md; fixing line
238 here would conflict with it.

Modification:
Drop the line 238 typo fix from this PR; #3583 fixes it together with
line 239.

Result:
This PR and #3583 merge cleanly.

Tests:
- Not run - docs only

References:
Refs #3583

* docs: mapAsync processes up to parallelism elements concurrently

Motivation:
The mapAsync page says "Up to `n` elements can be processed
concurrently", but the parameter is called parallelism. #3590 could
not fix it because this PR changes the line before it.

Modification:
Say `parallelism` instead of `n`.

Result:
The description matches the mapAsync(parallelism)(f) signature.

Tests:
- Not run - docs only

References:
Refs #3590

@He-Pin He-Pin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work - I independently checked the config keys and API names against reference.conf and the sources and they all hold: pekko.remote.classic.retry-gate-closed-for, pekko.cluster.split-brain-resolver.stable-after, monitored-by-nr-of-members = 9, fork-join-executor (there is no fork-join-dispatcher anywhere), allow-java-serialization = off, and redeliveryBurstLimit. CI is fully green and the @@@ block balance is unchanged in every file.

Two things before I merge:

  1. One inline comment below about -2.3.
  2. Non-blocking nit: in the ActorFlow ask* pages, replacing @apidoc[AskTimeoutException] with plain java.util.concurrent.TimeoutException is true but less precise - AskTimeoutException is the class actually thrown (ActorFlow.scala:51 catches it, and it extends concurrent.TimeoutException). Keeping a @apidoc[AskTimeoutException] (a java.util.concurrent.TimeoutException) would preserve both the link and the catchable type users need for onErrorResume.

java -classpath <jar files, including pekko-cluster-sharding>
org.apache.pekko.cluster.sharding.RemoveInternalClusterShardingData
-2.3 entityType1 entityType2 entityType3
entityType1 entityType2 entityType3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-2.3 is not a wrong value here: the flag is still parsed (RemoveInternalClusterShardingData.scala:77 args(0) == "-2.3") and remove2dot3Data is still a parameter of the public remove method. #3584 removes the matching paragraph from the class Scaladoc in the same batch, so if both land the flag ends up documented nowhere while still being live API. Could you keep it in this example (marked as legacy/optional if you like), and let the actual removal be one deliberate change covering code, Scaladoc, docs and MiMa together?

@He-Pin

He-Pin commented Oct 9, 2026

Copy link
Copy Markdown
Member

Pushed a549820 to restore -2.3 in the RemoveInternalClusterShardingData example - same reasoning as #3584: the flag is still live, so the docs should keep showing it until it is actually removed. Everything else in this PR checked out against the sources. Will merge once CI is green.

@He-Pin

He-Pin commented Oct 9, 2026

Copy link
Copy Markdown
Member

Also merged current main into the branch (clean, no conflicts) and folded in two small follow-ups from the #3587/#3588 reviews: the malformed @scaladoc[Array](scala.Array)[@scaladoc[Byte](scala.Byte)] nesting in io.md is now the standard @scaladoc[Array[Byte]](scala.Array) form, and the last remaining "observed-removed" typo (typed/distributed-data.md:316) is fixed. Closing #3599/#3600 in favour of keeping these here.

pjfanning and others added 7 commits October 9, 2026 13:39
Motivation:
A review of the docs found statements that are out of date for Pekko
2.0 (JDK 8 advice, removed features described as current, old build
tool versions and syntax, deprecated APIs described as the main way)
and config keys, class names and method names that do not exist and
would fail if copied.

Modification:
- Outdated for 2.0: auto-down, the pekko-cluster script, async-dns
  default, binary compatibility and may-change notes, container JVM
  flags, packaging tool versions and Gradle Shadow snippets, Lombok
  version, typesafehub links, Java 8/9 qualifiers and javadoc links,
  sbt colon/`in` syntax and procedure syntax in multi-jvm testing,
  JDK paths in multi-node testing, LevelDB dependencies, Props.create,
  Akka version references, the SecurityManager UDP note, pre-fork
  issue and Activator links, the pre-1.0 Pekko Management migration
  section, the -2.3 sharding data flag, Java pattern matching
  versions, stream docs (MaterializedMap, flatMap note, mapConcat
  signatures, stubs, SI-2712/Dotty, deprecated Source.queue prose,
  TestSink/TestSource.probe, Source.actorRef completion,
  Sink.collection Factory, ActorFlow timeout exception,
  javaCollectorParallelUnordered description)
- Wrong config keys: auto-start-journals/snapshot-stores values,
  classic retry-gate-closed-for, artery canonical port, failure
  detector implementation-class, aeron-dir, actor.provider, extension
  FQCNs, monitored-by-nr-of-members default, stash-capacity default,
  JMX MBean name
- Wrong API names: ProducerController, CurrentShardRegionState,
  extractShardId, Backoff options, DeleteFailure/StoreFailure,
  RefreshInterval, typed ActorSystem, pekko-cluster-typed artifact,
  Pekko Projections version, Compression.inflate, RunnableGraph and
  BidiFlow in stream composition

Result:
The docs match the 2.0 code and copied config/API names work.

Tests:
- Not run - docs only

References:
None - found during a review of the docs
…tStream

Motivation:
The mapWithResource and fromOutputStream operator pages give the
blocking dispatcher setting as
org.apache.pekko.stream.materializer.blocking-io-dispatcher, which does
not exist, and call these operators a Source.

Modification:
Use pekko.stream.materializer.blocking-io-dispatcher, and call them a
Flow and a Sink.

Result:
The documented key matches stream reference.conf.

Tests:
- Not run - docs only

References:
Refs apache#3586
Motivation:
More doc pages state facts, settings and API names that do not match
the code.

Modification:
- remoting.md: classic remoting needs netty-transport and netty-handler
- cluster-metrics.md: name moving-average-half-life and link this page
- routing.md: fork-join-executor
- split-brain-resolver.md: stable-after; keep-majority is described above
- logging.md: dead letter logging during shutdown is off by default
- persistence-schema-evolution.md: Java serialization is disabled by
  default
- fsm.md: UnsubscribeTransitionCallBack
- testing.md: ignoreNoMsg, int, remove duplicated sentence
- persistence-query.md: getReadJournalFor, Offset, newer events, title,
  ReadJournalProvider label
- io-udp.md: Udp.Bind in Scala
- includes/cluster.md: remembered entities
- discovery/index.md: _service._tcp.pekko.test
- general/addressing.md: root down
- project/downstream-upgrade-strategy.md: patch example 1.1.1
- common/circuitbreaker.md: not an actor; CompletionStage
- typed/dispatchers.md: org.apache.pekko.dispatch.ExecutorServiceConfigurator
- ExtensionDocSpec.scala (typed/extending.md snippet): real DatabasePool
  class name
- typed/guide/tutorial_1.md: typed tell takes one argument
- typed/durable-state/persistence.md: DurableStateBehavior names, state
  not events
- typed/mailboxes.md: fromConfig selects a mailbox; classic Settings
- typed/routers.md: preferLocalRoutees is only for group routers
- typed/interaction-patterns.md: typed TimerScheduler links and
  startTimer* names; askWithStatus links ActorContext
- typed/replicated-eventsourcing-auction.md: WinnerDecided, Finish

Result:
These pages match the code.

Tests:
- Not run - docs only (plus a string in a doc snippet source)

References:
None - found during a review of the docs
Motivation:
Two fixes were held back from apache#3587 because they touch files this PR
also changes.

Modification:
- typed/interaction-patterns.md: the Java StatusReply.ack() link used a
  Scaladoc-style StatusReply$ target; use pekko.pattern.StatusReply#ack()
- StreamConverters/fromOutputStream.md: the IOResult carries the number
  of bytes written, not the size of a file (OutputStreamGraphStage)

Result:
The link resolves and the description matches the code.

Tests:
- Not run - docs only

References:
Refs apache#3587
Motivation:
apache#3588 fixes typos across the docs but skipped the ones next to lines
this PR changes, to avoid merge conflicts.

Modification:
- split-brain-resolver.md: stray asterisk, "its self" -> "itself"
- discovery/index.md: "which i configured" -> "which is configured",
  "which two hosts" -> "with two hosts"

Result:
These typos are fixed without conflicting with apache#3588.

Tests:
- Not run - docs only

References:
Refs apache#3588
@He-Pin
He-Pin force-pushed the docs-outdated-for-2.0 branch from 2a9ba7a to e3d0f75 Compare October 9, 2026 05:40
@He-Pin

He-Pin commented Oct 9, 2026

Copy link
Copy Markdown
Member

Replaced my earlier merge commit with a clean rebase onto current main (8a012b9): your 5 commits replayed without conflicts, plus two small follow-up commits (keep -2.3 in the example; fix the malformed Array[Byte] scaladoc link in io.md and the leftover "observed-removed" typo folded in from #3599/#3600, which are closed). Branch tip is now e3d0f75.

@He-Pin He-Pin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

He-Pin added a commit that referenced this pull request Oct 9, 2026
…ge (#3584)

* chore: remove stale Akka-era references from Scaladoc and a log message

Motivation:
Some Scaladoc and one log message still refer to Akka-era details
that are misleading for Pekko users.

Modification:
- RemoveInternalClusterShardingData: drop the -2.3 flag (for data
  written by Akka 2.3.x) from the usage example and description, and
  no longer mention auto-down as a cause of corrupt data
- Cluster: the auto-down warning says auto-down is not supported in
  Pekko instead of "removed in Akka 2.6.0"
- Sink.collection Scaladoc: refer to the collection `Factory` instead
  of `CanBuildFrom`

Result:
Scaladoc and the warning match Pekko.

Tests:
- Not run - Scaladoc and log message text only

References:
Refs #3583

* docs: keep the -2.3 flag documentation in the Scaladoc

---------

Co-authored-by: 虎鸣 <hepin.p@alibaba-inc.com>
@He-Pin
He-Pin merged commit 2ca08f4 into apache:main Oct 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants