Skip to content

Commit

Permalink
KAFKA-18070: Update kafka-metadata-quorum.sh output in docs to match …
Browse files Browse the repository at this point in the history
…KIP-853 (#17921)

Reviewers: Ziming Deng <[email protected]>.
  • Loading branch information
brandboat authored and cmccabe committed Dec 3, 2024
1 parent ae41e23 commit 6cec93a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,9 @@ <h4 class="anchor-heading"><a id="replace_disk" class="anchor-link"></a><a href=
<p>If the data in the cluster metadata directory is lost either because of hardware failure or the hardware needs to be replaced, care should be taken when provisioning the new controller node. The new controller node should not be formatted and started until the majority of the controllers have all of the committed data. To determine if the majority of the controllers have the committed data, run the <code>kafka-metadata-quorum.sh</code> tool to describe the replication status:</p>

<pre><code class="language-bash">$ bin/kafka-metadata-quorum.sh --bootstrap-server localhost:9092 describe --replication
NodeId LogEndOffset Lag LastFetchTimestamp LastCaughtUpTimestamp Status
1 25806 0 1662500992757 1662500992757 Leader
NodeId DirectoryId LogEndOffset Lag LastFetchTimestamp LastCaughtUpTimestamp Status
1 dDo1k_pRSD-VmReEpu383g 966 0 1732367153528 1732367153528 Leader
2 wQWaQMJYpcifUPMBGeRHqg 966 0 1732367153304 1732367153304 Observer
... ... ... ... ... ...</code></pre>

<p>Check and wait until the <code>Lag</code> is small for a majority of the controllers. If the leader's end offset is not increasing, you can wait until the lag is 0 for a majority; otherwise, you can pick the latest leader end offset and wait until all replicas have reached it. Check and wait until the <code>LastFetchTimestamp</code> and <code>LastCaughtUpTimestamp</code> are close to each other for the majority of the controllers. At this point it is safer to format the controller's metadata log directory. This can be done by running the <code>kafka-storage.sh</code> command.</p>
Expand Down

0 comments on commit 6cec93a

Please sign in to comment.