Skip to content

2.29.0.0-b23

@mdbridge mdbridge tagged this 07 Oct 18:26
Summary:
The definition of this is:
```
~/code/yugabyte-db/src/yb/rpc/rpc_metrics.cc:38:
METRIC_DEFINE_counter(server, rpc_inbound_calls_failed,
                      "Number of failed RPC inbound calls.",
                      yb::MetricUnit::kRequests,
                      "Number of failed RPC inbound calls.");
```

yet it is bumped exactly backwards:
```
~/code/yugabyte-db/src/yb/rpc/inbound_call.cc:232:
  if (is_success) {
    IncrementCounter(rpc_metrics_->inbound_calls_failed);
  }
```

This fixes this.  Also provided somewhat more information about what
this metric means.

UPDATE: this fix revealed that the test PgLibPqTest.NumberOfInitialRpcs was silently broken and the number it was supposed to be protecting had silently regressed.  :-(

Adjusted the test to pass for now but created an issue to fix the regression.

Jira: DB-18502

Test Plan:
Started up a local cluster and got:
```
# HELP rpc_inbound_calls_failed Number of failed RPC inbound calls; these are calls where we respond with failure.
# TYPE rpc_inbound_calls_failed counter
rpc_inbound_calls_failed{metric_id="yb.master",exported_instance="ml-win-DIB1N:7000",metric_type="server"} 0 1759447052655
```
(previously this was a large value because every RPC was bumping this)

```
ybd release --cxx-test pgwrapper_pg_libpq-test --gtest_filter PgLibPqTest.NumberOfInitialRpcs
```

Reviewers: asrivastava, #db-approvers, hsunder

Reviewed By: asrivastava, #db-approvers, hsunder

Subscribers: hsunder, svc_phabricator, yql, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D47173
Assets 2
Loading