This topic introduces the Transaction Rollback Ratio monitoring metric for OceanBase tenants. You can specify the statistical scope to query the Transaction Rollback Ratio data of a tenant in a single zone or OBServer node.
Metric description
The rollback ratio of all transactions within the statistical scope.
Metric parameter description
Metric |
Metric name |
Unit |
|---|---|---|
| transaction_rollback_ratio | transaction_rollback_ratio | % |
Calculation expression
100 * 1 / (1 + sum(rate(ob_sysstat{stat_id="30007",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30009",@LABELS}[@INTERVAL])) by (@GBLABELS))
Sampling SQL
For OceanBase versions earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30007, 30009) and (con_id > 1000 or con_id = 1) and class < 1000For OceanBase V4.0 and later:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30007, 30009) and (con_id > 1000 or con_id = 1) and class < 1000
