Class ConsensusModuleSnapshotPendingServiceMessagesPatch

java.lang.Object
io.aeron.cluster.ConsensusModuleSnapshotPendingServiceMessagesPatch

public class ConsensusModuleSnapshotPendingServiceMessagesPatch extends Object
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 Details

  • Method Details

    • execute

      public boolean execute(File clusterDir)
      Execute the code to patch the latest snapshot.
      Parameters:
      clusterDir - of the cluster node to run the patch tool on.
      Returns:
      true if the patch was applied or false if consensus module state was already correct.
      Throws:
      NullPointerException - if null == clusterDir.
      IllegalArgumentException - if clusterDir does not exist or is not a directory.
      ClusterException - if clusterDir does not contain a recording log or if the log does not contain a valid snapshot.
    • main

      public static void main(String[] args)
      Entry point to launch the tool. Requires a single parameter of a cluster directory.
      Parameters:
      args - for the tool.