Quick revision
The short answer
The metadata quorum has lost its majority in practice: a metadata record commits only when a majority of the three voters have it, and both followers are more than 2 million records behind, so the active controller cannot advance the metadata high watermark. Every change that needs a commit, such as topic creation, reassignment or an ISR update, waits and times out, while producing and consuming keep working from the metadata the brokers already hold. We recover by finding what slows the followers (disk, GC, network, a snapshot load), fixing it, and watching Lag and LastCaughtUpTimestamp until they catch up.
What to remember
In this answer, we saw that the metadata log commits a record only when a majority of voters hold it, so two followers lagging by millions of records leave the active controller unable to advance its high watermark, and every metadata change times out. Brokers keep serving traffic from their existing metadata image, but the cluster cannot create topics, record ISR changes or elect leaders. We recover by finding and fixing what slows the followers, waiting for them to catch up, and from then on restarting controllers one at a time with a catch-up check in between.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
The metadata quorum has lost its majority in practice: a metadata record commits only when a majority of the three voters have it, and both followers are more than 2 million records behind, so the active controller cannot advance the metadata high watermark. Every change that needs a commit, such as topic creation, reassignment or an ISR update, waits and times out, while producing and consuming keep working from the metadata the brokers already hold. We recover by finding what slows the followers (disk, GC, network, a snapshot load), fixing it, and watching Lag and LastCaughtUpTimestamp until they catch up.
Why this question is asked
This is a classic post-maintenance surprise. The cluster looks healthy from the application side, dashboards show traffic flowing, yet every administrative operation fails. Interviewers like it because it tests whether we understand that the controllers form their own replicated log with its own commit rule, separate from topic data, and whether we can read the quorum tool's output. In this answer, we will recap how the metadata log commits records, read the describe --replication output, explain why the data path is unaffected, walk through the investigation, and then cover recovery and prevention.
1A Quick Recap of How Metadata Commits
In KRaft, the controllers keep cluster metadata in a Raft log called __cluster_metadata. The active controller is the Raft leader: it appends each new record, such as 'topic payments created with 12 partitions', and the other voters fetch and append it. The leader then advances a high watermark, the offset below which a majority of voters hold every record. Only records below the high watermark are committed, applied, and published to brokers.
So a metadata change completes only when a majority, two out of three here, has stored it. The active controller always counts as one. It needs at least one follower that is caught up to the new record's offset. If both followers are stuck far behind, the record sits in the leader's log uncommitted, and the API call that caused it waits until it times out.
2Reading the Quorum Output
The tool kafka-metadata-quorum.sh shows the state of each voter. Here is a trimmed version of what we would see.
Notice what the columns tell us. LastFetchTimestamp for the followers is recent, so they are alive and still fetching. But LastCaughtUpTimestamp is several minutes old and Lag is in the millions, so they are fetching far slower than the log is growing or are stuck working through a backlog. Brokers appear as observers: they read the log but do not vote, so their freshness does not help the commit.
The leader's high watermark can only move up to the offset that a majority has. With two followers at about 6.1 to 6.2 million and the leader at 8.4 million, nothing above roughly 6.2 million can commit. Every new record goes onto the end of a queue that is not moving.
3Why Producing and Consuming Still Work
Brokers keep their own in-memory metadata image, built from records that were already committed. They do not need the controller for each produce or fetch. Partition leaders keep accepting writes, followers keep replicating, and consumer group coordination happens on brokers, so applications keep running.
What needs the controller is anything that changes metadata: creating or deleting topics, altering configs, reassigning partitions, and also ISR changes. That last one is the hidden danger. If a follower falls out of sync, the leader cannot record the ISR shrink, and if a broker dies, its partitions cannot get new leaders until commits resume. So this is not a cosmetic problem; it removes the cluster's ability to heal itself.
- Admin calls time out, data path fine?classic sign of a commit problem
- Followers' LastFetchTimestamp recent?YesLook for the cause of slow fetchingNoFollower process down or network cut
- Follower loading a snapshot?YesWait and watch it finishNoCheck disk, GC and network
- Lag shrinking over time?YesKeep watching until Lag is near 0NoFix the slow resource first
- Resume admin work, restart the next node only after catch-up
5 steps in order. Play them, or step through them one at a time.
The commit rule turns two slow followers into a full control-plane outage.
4Finding Why the Followers Do Not Catch Up
The rolling restart is the trigger, so we start by asking what the restarted controllers are doing. A controller that restarts must rebuild its state: it loads the latest metadata snapshot and replays the records after it. If it was far behind or the log has no recent snapshot, the leader may have to send it a snapshot first, and loading a large snapshot for a cluster with many thousands of partitions can take a while. The controller logs show snapshot loading and replay progress.
Next we look at resources. The metadata log is written with fsync, because Raft durability depends on it, so disk latency on the metadata log directory directly limits how fast a follower can append. A controller that shares a disk with a busy broker, or sits on network storage with high latency, can fall behind under load. Long garbage collection pauses, visible in the GC log, stop fetching entirely for seconds at a time. Network problems between controllers, for example a controller placed in a distant zone, show up as slow fetch responses. And if the restart happened while a large reassignment or a topic storm was in progress, the log may be growing faster than usual.
A small cross-check helps: if both followers are slow in the same way and they share hardware or configuration that the leader does not, that is our cause. If one follower is healthy but restarting the other made things worse, we were restarting too fast.
5Recovering and Preventing It Next Time
Recovery is mostly about removing the bottleneck and letting Raft do its job. We move the controllers' metadata directory to fast local disks if needed, fix the GC settings or heap, or stop the competing broker workload on those hosts. Then we watch describe --replication: Lag should fall and LastCaughtUpTimestamp should become current. As soon as one follower is caught up, the majority exists again, the high watermark jumps forward and the queued changes commit. We should not restart more controllers while they are behind, because every restart throws away in-memory progress.
For the future, a rolling restart of controllers should be one node at a time, waiting until the restarted node's Lag is near zero and its LastCaughtUpTimestamp is current before touching the next. That simple rule turns a rolling restart into a non-event. Keep controllers on dedicated nodes with low-latency disks, make sure snapshots are being produced so restarts load quickly, and alert on things that reveal this early: the active controller count across the cluster (exactly one), metadata commit latency, controller event queue time, and follower lag from the quorum tool.
6Follow-up questions
Why does the tool show brokers as observers?
Brokers fetch the metadata log to build their image, so they appear in the replication output, but they are not voters. Their positions do not count towards the majority, so a fully caught-up broker cannot help the controller commit. Observers are still useful in the output, because a broker with a large lag is serving clients from stale metadata.
Could we force progress by removing the slow voters?
With a dynamic quorum we can change voters with add-controller and remove-controller, but a voter change is itself a metadata change that needs a commit by the current majority, so it cannot rescue a quorum that cannot commit. The real fix is to let followers catch up. Shrinking a quorum also reduces failure tolerance, so it is not an emergency tool.
7Conclusion
In this answer, we saw that the metadata log commits a record only when a majority of voters hold it, so two followers lagging by millions of records leave the active controller unable to advance its high watermark, and every metadata change times out. Brokers keep serving traffic from their existing metadata image, but the cluster cannot create topics, record ISR changes or elect leaders. We recover by finding and fixing what slows the followers, waiting for them to catch up, and from then on restarting controllers one at a time with a catch-up check in between.
Open with
What I see here is a control plane that cannot commit. In KRaft the controllers replicate the __cluster_metadata log with Raft, and a record is committed only when a majority of voters have it.
Then, if they want more
The leader is at offset 8.4 million and both followers are more than 2 million behind, with LastCaughtUpTimestamp minutes old, so the leader has no partner to form a majority and its high watermark cannot move. Every request that needs a new committed record, like topic creation, reassignment or an ISR update, just waits and times out.
Produce and consume still work because brokers serve from the metadata image they already have, but that is fragile: if a broker died now, its partitions could not get new leaders.
To diagnose, I would check that the followers are fetching at all, then look at their logs for snapshot loading or replay after the restart, at disk latency on the metadata log directory, GC pauses, the network between controllers, and whether they share disks with busy brokers.
I would fix that bottleneck, avoid restarting anything else, and watch Lag and LastCaughtUpTimestamp in describe --replication until a follower is caught up; then commits resume on their own. Going forward I would restart controllers one at a time with a catch-up check, keep them on dedicated fast disks, and alert on follower lag and commit latency.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Kafka documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "kafka-metadata-quorum.sh describe --replication shows the leader at LogEndOffset...": https://scrivio-interview-library.netlify.app/spring-boot/kafka-internals/4cf6b91dd4/