Skip to content

RATIS-2518. Make testInstallSnapshotDuringBootstrap diagnostics fail-safe.#1447

Open
slfan1989 wants to merge 1 commit into
apache:RATIS-1931_grpc-zero-copyfrom
slfan1989:RATIS-2518
Open

RATIS-2518. Make testInstallSnapshotDuringBootstrap diagnostics fail-safe.#1447
slfan1989 wants to merge 1 commit into
apache:RATIS-1931_grpc-zero-copyfrom
slfan1989:RATIS-2518

Conversation

@slfan1989

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This is a follow-up to RATIS-2501.

RATIS-2501 added additional diagnostics for testInstallSnapshotDuringBootstrap failures. However, the diagnostic path may access raft log state from a peer whose raft log has already been closed. When this happens, dumpClusterState() can throw a secondary IllegalStateException, which hides the original failure that the diagnostics were intended to explain.

This patch makes dumpClusterState() fail-safe by safely collecting diagnostic values. If a diagnostic value is unavailable, it is logged as unavailable: <exception> instead of throwing from the diagnostic path.

What is the link to the Apache JIRA

JIRA: RATIS-2518. Make testInstallSnapshotDuringBootstrap diagnostics fail-safe.

How was this patch tested?

Tested with:

./mvnw -pl ratis-test -am -Pgrpc-tests -Dtest=TestInstallSnapshotNotificationWithGrpc#testInstallSnapshotDuringBootstrap test

Result:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.ratis.grpc.TestInstallSnapshotNotificationWithGrpc
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.33 s - in org.apache.ratis.grpc.TestInstallSnapshotNotificationWithGrpc
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

This PR has been marked as stale due to 60 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in ~30 days.

@github-actions github-actions Bot added the stale label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant