mix malachi. ring
(malachi v0.22.7)
View Source
Prints the cluster's durable ring: the vnode topology of record, read from a running Malachi node over Erlang distribution (RPC).
mix malachi.ring --showThe ring outranks MALACHI_LOG_VNODES at boot, because a ring grown by re-sharding no longer matches
the environment's even geometry and honouring the environment would orphan the migrated metadata. So
when a node logs that it ignored the environment, this is the command that says what it used instead:
the recorded version, the vnodes and their tokens, and where each one's ra cluster lives.
A pending line means a vnode split was interrupted; the node holding the lease carries it to completion, and it survives a full-cluster restart because the intent is part of the recorded ring.
Options:
--show: print the ring (the default, and currently the only action)--node: the target node (default$MALACHI_NODEormalachi@127.0.0.1)--cookie: the Erlang cookie (default$RELEASE_COOKIE, else~/.erlang.cookie)
The target node must be named and running a clustered control plane; an unclustered node has no ring store to read.
Summary
Functions
The testable core: reads the ring store on node through call (a
(module, fun, args -> {:ok, value} | {:error, reason}) seam that in production is an RPC to the
target node) and renders it. Returns {:ok, text} / {:error, message} for the caller to print.
Functions
@spec execute([String.t()], node(), (module(), atom(), list() -> {:ok, term()} | {:error, term()})) :: {:ok, String.t()} | {:error, String.t()}
The testable core: reads the ring store on node through call (a
(module, fun, args -> {:ok, value} | {:error, reason}) seam that in production is an RPC to the
target node) and renders it. Returns {:ok, text} / {:error, message} for the caller to print.
Stray positional arguments return usage rather than being ignored.