Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22142] CDCSDK: Remove table level attributes for CDCSDK Metrics
Summary: Currently the CDCSDK metrics fail the DCHECK on attributes in metrics-writer class method `AddAggregatedEntry()`. The DCHECK was introduced in the diff https://phorge.dev.yugabyte.com/D33396 and causes tserver crash, as it compares and expects all the attributes to be the same for a given metric entity type, i.e. it expects that all the attributes of entity type cdcsdk should have the same attributes. Currently the CDCSDK metrics store `table_name` and `table_id` in the attributes. However since the CDCSDK metrics are aggregated at stream level, they can have multiple tables associated with them. This causes the DCHECK to fail. Since we do not need `table_name` and `table_id` attributes for aggregation of CDCSDK metrics, the fix for this issue is removing the table level attributes from the attribute map for CDCSDK metrics. This DCHECK failure was not caught in any existing unit test, hence modifying an existing test. Also this was not caught in any QA stress tests as these are run in release mode. Jira: DB-11070 Test Plan: ./yb_build.sh --cxx-test integration-tests_cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestCDCSDKMetricsTwoTablesSingleStream PG connector test PostgresConnectorIT#shouldProduceEventsWithInitialSnapshot Reviewers: skumar, asrinivasan, vkushwaha, stiwary, yyan Reviewed By: yyan Subscribers: mlillibridge, ybase, ycdcxcluster Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D34528
- Loading branch information