Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The MetadataLoader is a critical component in KRaft clusters that processes metadata changes from the Raft layer and distributes them to various publishers. However, unlike similar event-driven components such as the QuorumController (which has ControllerEventManager::AvgIdleRatio ) and various coordinators, the MetadataLoader lacks the idle thread ratio metric for monitoring its event queue processing efficiency. This lack of visibility makes it challenging to assess the metadata processing pipeline's performance, detect potential bottlenecks in metadata propagation, or optimize resource allocation when metadata update frequency varies significantly.

Public Interfaces

Monitoring

NameTypeDescription
kafka.server:type=MetadataLoader,name=AvgIdleRatioTimeRatio

The idle ratio measures the proportion of time the MetadataLoader event queue thread is not actively processing metadata events. This metric uses the existing org.apache.kafka.server.metrics.TimeRatio implementation, which tracks idleness over the actual measurement interval.

The metric's value ranges from 0 to 1, where 0 indicates the thread is constantly processing events without breaks, and 1 signifies the thread is almost always waiting for work.


Compatibility, Deprecation, and Migration Plan

...