Package com.linkedin.davinci.stats
Class ParticipantStateTransitionStats
java.lang.Object
com.linkedin.venice.stats.AbstractVeniceStats
com.linkedin.venice.stats.ThreadPoolStats
com.linkedin.davinci.stats.ParticipantStateTransitionStats
Tracks partition state transition metrics for the Helix participant. Extends
ThreadPoolStats
(which already has OTel for thread pool metrics) and adds:
- Blocked thread count per (from, to) state pair (currently only OFFLINE→DROPPED)
- In-progress partition counts per (from, to) state pair
- Active partition counts per Helix state: ERROR, STANDBY, LEADER
All three OTel metrics use UP_DOWN_COUNTER (+1/-1 at call sites). Tehuti uses AsyncGauge polling AtomicInteger trackers. The AtomicIntegers are Tehuti-only artifacts — they will be removed when Tehuti is retired.
-
Field Summary
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceStats
DELIMITER -
Constructor Summary
ConstructorsConstructorDescriptionParticipantStateTransitionStats(io.tehuti.metrics.MetricsRepository metricsRepository, ThreadPoolExecutor threadPoolExecutor, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidDecrements the blocked-thread count for the OFFLINE→DROPPED transition.voidIncrements the blocked-thread count for the OFFLINE→DROPPED transition.voidtrackStateTransitionCompleted(String fromState, String toState) voidtrackStateTransitionFailed(String fromState, String toState) Called when a state transition handler throws.voidtrackStateTransitionStarted(String fromState, String toState) Methods inherited from class com.linkedin.venice.stats.ThreadPoolStats
recordQueuedTasksCountMethods inherited from class com.linkedin.venice.stats.AbstractVeniceStats
avgAndMax, avgAndTotal, getMetricFullName, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotal, registerPerStoreAndTotalSensor, registerSensor, registerSensor, registerSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
Constructor Details
-
ParticipantStateTransitionStats
public ParticipantStateTransitionStats(io.tehuti.metrics.MetricsRepository metricsRepository, ThreadPoolExecutor threadPoolExecutor, String name)
-
-
Method Details
-
incrementThreadBlockedOnOfflineToDroppedTransitionCount
public void incrementThreadBlockedOnOfflineToDroppedTransitionCount()Increments the blocked-thread count for the OFFLINE→DROPPED transition. Only call from OFFLINE→DROPPED transitions — the OTel dimensions are hardcoded to that pair. -
decrementThreadBlockedOnOfflineToDroppedTransitionCount
public void decrementThreadBlockedOnOfflineToDroppedTransitionCount()Decrements the blocked-thread count for the OFFLINE→DROPPED transition. Only call from OFFLINE→DROPPED transitions — the OTel dimensions are hardcoded to that pair. -
trackStateTransitionStarted
-
trackStateTransitionCompleted
-
trackStateTransitionFailed
Called when a state transition handler throws. Decrements the in-progress counter to avoid leaking +1 forever for(fromState, toState). Steady-state fortoStateis NOT incremented because the partition did not reachtoState; steady-state forfromStatewas already decremented intrackStateTransitionStarted(java.lang.String, java.lang.String)and stays decremented because the partition has leftfromState(Helix typically marks it ERROR and a follow-up transition will track that).
-