Repository navigation
docs: fix outdated content and wrong config keys and API names - #3583
Conversation
…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
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
…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
* 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
left a comment
There was a problem hiding this comment.
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:
- One inline comment below about
-2.3. - Non-blocking nit: in the ActorFlow
ask*pages, replacing@apidoc[AskTimeoutException]with plainjava.util.concurrent.TimeoutExceptionis true but less precise -AskTimeoutExceptionis the class actually thrown (ActorFlow.scala:51catches it, and it extendsconcurrent.TimeoutException). Keepinga @apidoc[AskTimeoutException] (ajava.util.concurrent.TimeoutException)would preserve both the link and the catchable type users need foronErrorResume.
| java -classpath <jar files, including pekko-cluster-sharding> | ||
| org.apache.pekko.cluster.sharding.RemoveInternalClusterShardingData | ||
| -2.3 entityType1 entityType2 entityType3 | ||
| entityType1 entityType2 entityType3 |
There was a problem hiding this comment.
-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?
|
Also merged current main into the branch (clean, no conflicts) and folded in two small follow-ups from the #3587/#3588 reviews: the malformed |
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
2a9ba7a to
e3d0f75
Compare
|
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 |
…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>
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 featurecluster-usage.md:pekko-clusterscript "may be removed in a future release"; explain wherejmxsh-R5.jarcomes from (the script downloads it); JDK 17 JMX linkio-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 wordingadditional/deploying.md: replace the removedUseCGroupMemoryLimitForHeapflag with container-support /MaxRAMPercentageguidanceadditional/packaging.md: sbt 1.13.0,com.github.sbtsbt-native-packager 1.13.0, maven-shade 3.6.2, heading matches content; Gradle snippets moved tocom.gradleup.shadow9.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 bannerdispatchers.md,typed/dispatchers.md: drop "Java 9+" qualifier; JDK 17 javadoc linksmulti-jvm-testing.md,multi-node-testing.md: sbt slash syntax, Scala 3 compatiblemain, JDK 17/21 pathspersistence.md,persistence-plugins.md: LevelDB 0.12, document both native and Java-port dependenciesremoting.md:Props.create;supervision-classic.md: no Akka version,whenTerminated;testing.md: Pekko not Akka 2.xio-udp.md: drop SecurityManager note;coordinated-shutdown.md: drop pre-fork issue link;distributed-pub-sub.md: drop dead Activator linkdiscovery/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 matchesDuration.ofMinutessnippettyped/cluster-sharding.md: drop-2.3flag from the remove-internal-data example;typed/actors.md: correct Java pattern matching versionsMaterializedMap,flatMapnote andmapConcatsignatures (IterableOnce/java.lang.Iterable), stale "stub" notes, SI-2712/Dotty text,Source.queueprose rewritten forBoundedSourceQueue(deprecated overloads moved to a note),PubSub.source/sinkheadings,TestSink()/TestSource()instead of removedprobe,Source.actorRefcompletion viacompletionMatcher,Sink.collectionusesscala.collection.Factory, ActorFlow ask timeout isjava.util.concurrent.TimeoutException, real description forjavaCollectorParallelUnorderedWrong config keys
persistence-plugins.md:auto-start-journals/auto-start-snapshot-storestake config pathsremoting.md:pekko.remote.classic.retry-gate-closed-for;multi-jvm-testing.md:pekko.remote.artery.canonical.portand a real multi-jvm test nametyped/cluster.md:pekko.cluster.failure-detector.implementation-class,new Down(address)remoting-artery.md:pekko.remote.artery.advanced.aeron.aeron-dircluster-client.md,cluster-metrics.md:pekko.actor.provider, fully qualified extension class namestyped/cluster-concepts.md: monitored by up to 9 nodes;typed/persistence.md:stash-capacitydefault 4096 and overflow strategyadditional/operations.md: JMX MBeanpekko:type=Clusterstream/operators/Source-or-Flow/mapWithResource.md,stream/operators/StreamConverters/fromOutputStream.md:pekko.stream.materializer.blocking-io-dispatcher(noorg.apache.prefix); these operators are a Flow and a Sink, not a SourceWrong API names
ProducerController,ShardRegion.CurrentShardRegionState,extractShardId,BackoffOnStopOptions/BackoffOnFailureOptions,Replicator.DeleteFailure/StoreFailure, noRefreshIntervalhint,org.apache.pekko.actor.typed.ActorSystem,pekko-cluster-typedartifact for singleton, Pekko Projections has its own version,Compression.inflate,RunnableGraph.fromGraph/BidiFlowin stream compositionOther wrong facts
remoting.md: classic remoting needsnetty-transport+netty-handler(not the Netty 3nettyartifact)cluster-metrics.md: moving average is set bypekko.cluster.metrics.collector.moving-average-half-liferouting.md:fork-join-executor;split-brain-resolver.md:stable-after,keep-majoritydescribed abovelogging.md: dead letter logging during shutdown is off by default;persistence-schema-evolution.md: Java serialization is disabled by defaultfsm.md:UnsubscribeTransitionCallBack;testing.md:ignoreNoMsg,int, duplicated sentence removedpersistence-query.md:getReadJournalFor,Offset, newer events, title,ReadJournalProviderlabel;io-udp.md:Udp.Bindincludes/cluster.md: remembered entities;discovery/index.md:_service._tcp.pekko.test;general/addressing.md: root downproject/downstream-upgrade-strategy.md: patch example 1.1.1;common/circuitbreaker.md: not an actor,CompletionStagetyped/dispatchers.md:org.apache.pekko.dispatch.ExecutorServiceConfigurator;ExtensionDocSpec.scalasnippet (used bytyped/extending.md): realDatabasePoolclass nametyped/guide/tutorial_1.md: typedtelltakes one argument;typed/durable-state/persistence.md:DurableStateBehaviornames, state not eventstyped/mailboxes.md:fromConfigselects a mailbox, classicActorSystem.Settings;typed/routers.md:preferLocalRouteesonly for group routerstyped/interaction-patterns.md: typedTimerSchedulerlinks andstartTimer*names,askWithStatuslinksActorContext, JavaStatusReply.ack()link usesStatusReply#ack()stream/operators/StreamConverters/fromOutputStream.md: theIOResultcarries the number of bytes written, not a file size;typed/replicated-eventsourcing-auction.md:WinnerDecided,FinishEach change was checked against the source,
reference.confor build files in this repo.Not included (source changes, can follow separately): the Scaladoc of
RemoveInternalClusterShardingDatastill documents-2.3, theCluster.scalawarning still says "auto-down has been removed in Akka 2.6.0", and theSink.collectionScaladoc still mentionsCanBuildFrom.Result
The docs match the 2.0 code, and copied config keys and API names work.
Tests
ExtensionDocSpec.scaladoc snippet)References
None - found during a review of the docs