Skip to content

2.25.0.0-b378

@fourpointfour fourpointfour tagged this 27 Nov 08:33
Summary:
Currently we do not remove metrics corresponding to the deleted state table entries, for example, on deleting a CDC stream. These metrics hang around until there's a tserver restart. This might cause any external applications to read false values for metric objects which do not exist.

This diff introduces code changes which address the above issue by deleting the metric entity when the corresponding CDC stream is deleted.
Jira: DB-13995

Test Plan:
The following tests have been introduced:

```
./yb_build.sh --cxx-test cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestCDCMetricRemovalUponStreamDeletion
./yb_build.sh --cxx-test cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestCDCMetricRemovalUponSlotDeletionForLogicalReplication
./yb_build.sh --cxx-test cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestMetricObjectRemovalAfterStreamExpiration
```

Reviewers: skumar, sumukh.phalgaonkar, siddharth.shah

Reviewed By: sumukh.phalgaonkar

Subscribers: ycdcxcluster

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