From 15f738f374e4c4b8b3e6af6a6f15869bdb84724f Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 2 Jul 2026 23:00:39 +0200 Subject: [PATCH 1/7] RATIS-2589. Fix Javadoc warnings --- .../java/org/apache/ratis/client/api/DataStreamInput.java | 1 + .../org/apache/ratis/client/api/SnapshotManagementApi.java | 2 +- .../src/main/java/org/apache/ratis/util/LifeCycle.java | 6 +++--- .../main/java/org/apache/ratis/server/DataStreamMap.java | 2 +- .../java/org/apache/ratis/statemachine/StateMachine.java | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java b/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java index 0eff3cab16..64bfac8f78 100644 --- a/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java +++ b/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java @@ -17,6 +17,7 @@ */ package org.apache.ratis.client.api; +import org.apache.ratis.protocol.DataStreamPacket; import org.apache.ratis.protocol.DataStreamReply; import org.apache.ratis.util.ReferenceCountedObject; diff --git a/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java b/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java index 359763fe90..b63bc39492 100644 --- a/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java +++ b/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java @@ -40,7 +40,7 @@ default RaftClientReply create(boolean force, long timeoutMs) throws IOException /** * Trigger to create a snapshot. * - * @param creationGap When (creationGap > 0) and (lastAppliedIndex - lastSnapshotIndex < creationGap), + * @param creationGap When (creationGap > 0) and (lastAppliedIndex - lastSnapshotIndex < creationGap), * return lastSnapshotIndex; otherwise, take a new snapshot and then return its index. * When creationGap == 0, use the server configured value as the creationGap. * @return a reply. When {@link RaftClientReply#isSuccess()} is true, diff --git a/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java b/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java index 86846b81d9..79549cc5dc 100644 --- a/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java +++ b/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java @@ -40,13 +40,13 @@ * | -------------------------------- | * | | ------------------------ | | * | | | | | | - * | | PAUSED <---- PAUSING---- | | | + * | | PAUSED <---- PAUSING---- | | | * | | | ^ | | | | | * | | V | | V V V V - * NEW --> STARTING --> RUNNING --|--> CLOSING --> [CLOSED] + * NEW --> STARTING --> RUNNING --|--> CLOSING --> [CLOSED] * ^ | | | | ^ * | | | V V | - * ------- -------> EXCEPTION ----- + * ------- -------> EXCEPTION ----- * */ public class LifeCycle { diff --git a/ratis-server-api/src/main/java/org/apache/ratis/server/DataStreamMap.java b/ratis-server-api/src/main/java/org/apache/ratis/server/DataStreamMap.java index 87905df384..d95baee524 100644 --- a/ratis-server-api/src/main/java/org/apache/ratis/server/DataStreamMap.java +++ b/ratis-server-api/src/main/java/org/apache/ratis/server/DataStreamMap.java @@ -29,6 +29,6 @@ public interface DataStreamMap { CompletableFuture computeIfAbsent(ClientInvocationId invocationId, Function> newDataStream); - /** Similar to {@link java.util.Map#remove(java.lang.Object). */ + /** Similar to {@link java.util.Map#remove(java.lang.Object)}. */ CompletableFuture remove(ClientInvocationId invocationId); } diff --git a/ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java b/ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java index 61e708febb..d2443d9b55 100644 --- a/ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java +++ b/ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java @@ -226,7 +226,7 @@ default void notifySnapshotInstalled(InstallSnapshotResult result, long snapshot /** * Notify the {@link StateMachine} that the server for this division has been shut down. - * @Deprecated please use/override {@link #notifyServerShutdown(RoleInfoProto, boolean)} instead + * @deprecated please use/override {@link #notifyServerShutdown(RoleInfoProto, boolean)} instead */ @Deprecated default void notifyServerShutdown(RoleInfoProto roleInfo) { @@ -503,7 +503,7 @@ default FollowerEventApi followerEvent() { CompletableFuture query(Message request); /** - * Query the state machine, provided minIndex <= commit index. + * Query the state machine, provided minIndex <= commit index. * The request must be read-only. * Since the commit index of this server may lag behind the Raft service, * the returned result may possibly be stale. @@ -511,7 +511,7 @@ default FollowerEventApi followerEvent() { * When minIndex > {@link #getLastAppliedTermIndex()}, * the state machine may choose to either * (1) return exceptionally, or - * (2) wait until minIndex <= {@link #getLastAppliedTermIndex()} before running the query. + * (2) wait until minIndex <= {@link #getLastAppliedTermIndex()} before running the query. */ CompletableFuture queryStale(Message request, long minIndex); From cfa0fcab326a670f4fae188912c6fab7fb517e62 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 2 Jul 2026 23:02:36 +0200 Subject: [PATCH 2/7] fail on javadoc warnings --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 03148f44d7..13b67e86fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,7 @@ jobs: java-version: ${{ matrix.java }} needs-source-tarball: true script: compile - script-args: -Dmaven.compiler.release=${{ matrix.java }} + script-args: -Dmaven.compiler.release=${{ matrix.java }} -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }} split: ${{ matrix.java }} timeout-minutes: 30 secrets: From dff92dce013e30550337280b7c845d5e8450c551 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 2 Jul 2026 23:13:34 +0200 Subject: [PATCH 3/7] fix checkstyle --- .../java/org/apache/ratis/client/api/DataStreamInput.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java b/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java index 64bfac8f78..210585216c 100644 --- a/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java +++ b/ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamInput.java @@ -17,7 +17,6 @@ */ package org.apache.ratis.client.api; -import org.apache.ratis.protocol.DataStreamPacket; import org.apache.ratis.protocol.DataStreamReply; import org.apache.ratis.util.ReferenceCountedObject; @@ -31,8 +30,9 @@ public interface DataStreamInput extends Closeable { /** * Read the next chunk in the stream asynchronously. * The caller owns the returned {@link DataStreamReply} which is a {@link ReferenceCountedObject}. - * and a {@link DataStreamPacket}. Access the buffer via {@link DataStreamPacket#nioBuffer()} - * or {@link DataStreamPacket#nioBuffers()}. + * and a {@link org.apache.ratis.protocol.DataStreamPacket}. + * Access the buffer via {@link org.apache.ratis.protocol.DataStreamPacket#nioBuffer()} + * or {@link org.apache.ratis.protocol.DataStreamPacket#nioBuffers()}. * It must call {@link ReferenceCountedObject#release()} after consuming it. * * @return a future of the reference-counted reply. From 9218560603c4ec7720a9dfab1cdb6de1a52a6896 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 2 Jul 2026 23:27:13 +0200 Subject: [PATCH 4/7] enable release profile (for javadoc) --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13b67e86fa..3e35aa6490 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,7 @@ jobs: java-version: ${{ matrix.java }} needs-source-tarball: true script: compile - script-args: -Dmaven.compiler.release=${{ matrix.java }} -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }} + script-args: -Prelease -Dmaven.compiler.release=${{ matrix.java }} -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }} split: ${{ matrix.java }} timeout-minutes: 30 secrets: From 1247cecc3e1f7a66270b4b3a75945a7a57308a51 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Thu, 2 Jul 2026 23:31:54 +0200 Subject: [PATCH 5/7] do not skip javadoc in compile --- dev-support/checks/compile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-support/checks/compile.sh b/dev-support/checks/compile.sh index fba4394dec..a5b037e406 100755 --- a/dev-support/checks/compile.sh +++ b/dev-support/checks/compile.sh @@ -20,7 +20,7 @@ source "${DIR}/../find_maven.sh" : ${WITH_COVERAGE:="false"} -MAVEN_OPTIONS='-V -B -Dmaven.javadoc.skip=true -DskipTests' +MAVEN_OPTIONS='-V -B -DskipTests' if [[ "${WITH_COVERAGE}" != "true" ]]; then MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip" From 7c39e80a736b50c6e8b1d38067b91c097a5d619e Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Fri, 3 Jul 2026 06:27:17 +0200 Subject: [PATCH 6/7] fix javadoc for java 17 --- .../org/apache/ratis/server/raftlog/RaftLogSequentialOps.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ratis-server-api/src/main/java/org/apache/ratis/server/raftlog/RaftLogSequentialOps.java b/ratis-server-api/src/main/java/org/apache/ratis/server/raftlog/RaftLogSequentialOps.java index 5e8bd6d784..5aa63f8e82 100644 --- a/ratis-server-api/src/main/java/org/apache/ratis/server/raftlog/RaftLogSequentialOps.java +++ b/ratis-server-api/src/main/java/org/apache/ratis/server/raftlog/RaftLogSequentialOps.java @@ -134,7 +134,7 @@ default CompletableFuture appendEntry(LogEntryProto entry, TransactionCont /** * The same as append(Arrays.asList(entries)). * - * @deprecated use {@link #append(List)} + * @deprecated use {@link RaftLogSequentialOps#append(List)} */ @Deprecated default List> append(LogEntryProto... entries) { From 43a8c3d73e62277caeed948d968f7880eff87ee5 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Mon, 6 Jul 2026 20:55:49 +0200 Subject: [PATCH 7/7] =?UTF-8?q?use=20=C2=AB=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/apache/ratis/util/LifeCycle.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java b/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java index 79549cc5dc..ffcde12bde 100644 --- a/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java +++ b/ratis-common/src/main/java/org/apache/ratis/util/LifeCycle.java @@ -40,13 +40,13 @@ * | -------------------------------- | * | | ------------------------ | | * | | | | | | - * | | PAUSED <---- PAUSING---- | | | + * | | PAUSED «---- PAUSING---- | | | * | | | ^ | | | | | * | | V | | V V V V - * NEW --> STARTING --> RUNNING --|--> CLOSING --> [CLOSED] + * NEW --» STARTING --» RUNNING --|--» CLOSING --» [CLOSED] * ^ | | | | ^ * | | | V V | - * ------- -------> EXCEPTION ----- + * ------- -------» EXCEPTION ----- * */ public class LifeCycle {