Commit metrics MBean

The commit metrics MBean is useful for troubleshooting index performance and resolving data consistency issues that are caused by asynchronous commits between different index replicas.

The commit metrics MBean is useful for troubleshooting index performance as well as data consistency issues caused by asynchronous commits between different index replicas. Using this mbean is also useful for fine-tuning indexing backpressure. Back pressure is pausing or blocking the buffering of incoming requests after reaching a threshold until internal processing of buffered requests catches up.

The commit metrics mbean records the amount of time spent to execute two main phases of a commit operation on the index.

Main operational phases 

The main phases of a commit operation on the index are:

  • FLUSH: comprising the time spent by flushing the async indexing queue.
  • EXECUTE: comprising the time spent by actually executing the commit on the index.

Commit metrics mbean operations 

The commit metrics mbean measures latency in microseconds. Operations are:

  • setEnabled(boolean enabled)

    Enables/disables metrics recording. Enabled by default.

  • isEnabled()

    Checks that metrics recording is enabled.

  • getLatencyPercentile(String phase, double percentile)

    Gets a commit latency percentile by its phase.

  • getRecordedLatencyCount(String phase)

    Gets the total count of recorded latency metrics by its commit phase.

  • getUnrecordedLatencyCount()

    Gets the total count of unrecorded latency values due to exceeding the maximum tracked latency, which is 10 minutes.

  • resetLatency(String phase)

    Resets latency metrics for the given commit phase.

  • resetLatencies()

    Resets all latency metrics.

Commit metrics mbean operations use the FLUSH and EXECUTE commit phase names.