Package io.aeron.cluster
Class ConsensusModuleSnapshotPendingServiceMessagesPatch
java.lang.Object
io.aeron.cluster.ConsensusModuleSnapshotPendingServiceMessagesPatch
A tool to patch the latest consensus module snapshot if it has divergence in the pending service messages state.
This tool patches the state on a single node. It is recommended to run the tool on the leader node and distribute
the patched snapshot to all other nodes in a cluster.
The tool will attempt to connect to the running MediaDriver and the Archive of the cluster node.
Note: Run the tool only if the cluster is suspended or completely stopped!
-
Constructor Summary
ConstructorsConstructorDescriptionCreate new patch instance this default Archive values initialized toAeronArchive.Configuration.localControlChannel()andAeronArchive.Configuration.localControlStreamId(). -
Method Summary
-
Constructor Details
-
ConsensusModuleSnapshotPendingServiceMessagesPatch
public ConsensusModuleSnapshotPendingServiceMessagesPatch()Create new patch instance this default Archive values initialized toAeronArchive.Configuration.localControlChannel()andAeronArchive.Configuration.localControlStreamId().
-
-
Method Details
-
execute
Execute the code to patch the latest snapshot.- Parameters:
clusterDir- of the cluster node to run the patch tool on.- Returns:
trueif the patch was applied orfalseif consensus module state was already correct.- Throws:
NullPointerException- ifnull == clusterDir.IllegalArgumentException- ifclusterDirdoes not exist or is not a directory.ClusterException- ifclusterDirdoes not contain a recording log or if the log does not contain a valid snapshot.
-
main
Entry point to launch the tool. Requires a single parameter of a cluster directory.- Parameters:
args- for the tool.
-