Ensure failures are only incremented in RunnableWithMetrics
To maintain consistency, task and fetch ref failure counters should
only be incremented within RunnableWithMetrics.
The Runnable::run() method is the only place with visibility into the
final outcome of a task, which can either complete successfully
or fail.
The following metric should always converge to zero:
plugins_pull_replication_tasks_started_total -
plugins_pull_replication_tasks_completed_total -
plugins_pull_replication_tasks_failed_total
Intermediate statuses should continue to be handled outside the
Runnable implementation, but final state metrics must be updated
only from within it.
Change-Id: I2f07a12b7afca32d3d222d1c06262e4d34ae003f
1 file changed