Versions Compared

Key

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

...

Also, we should add metrics for the RemoteIndexCache which is a cache of remote index files that is helpful to avoid . The cache helps in avoiding re-fetching the index files like offset, and time indexes from the remote storage for every fetch call. Adding these metrics will improve the observability required for debugging issues.

Public Interfaces

The following metrics will be renamed:

...

The following metrics will be added to expose cache stats for the Remote Index Cache.

Name

Description

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=HitCount

The number of cache hits for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=MissCount

The number of cache misses for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=EvictionCount

The number of entries evicted from the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=LoadSuccessCount

The number of successful cache loads for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=LoadFailureCount

The number of failed cache loads for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=TotalLoadTime

Total load time (success and failure) for the remote index cache.

org.apache.kafka.storage.internals.log:type=RemoteIndexCache, name=EvictionWeight

The sum of weights of entries evicted from the remote index cache.

Proposed Changes

Compatibility, Deprecation, and Migration Plan

The metrics that are being renamed were only added as part of the same release. Hence, we do not need to maintain backward compatibility for the renamed metrics.

Test Plan

Unit Tests for all the introduced metrics in this KIP.

Rejected Alternatives

None