Skip to content

2024.2.0.0-b54

@SrivastavaAnubhav SrivastavaAnubhav tagged this 11 Oct 03:33
Summary:
Original commit: eaf3fbce2ce263eacb125f03cad868ce26ab126f / D38424
This diff adds a background task to the tserver that periodically updates two data size
metrics: `ts_data_size` and `ts_active_data_size`. The former is the cumulative size of all files in
the RocksDB, IntentsDB, WALs, and snapshot directories. The latter includes RocksDB, IntentsDB, and
WALs if and only if a tablet is not hidden.

It was necessary to add these metrics because simply summing the existing
`rocksdb_current_version_sst_files_size` metric across all tablets would double-count hard links.
(Hard links are used for tablet splitting and DB cloning, but the tablet splitting ones go away
after the split child completes its post-split compaction.)

The background task is controlled by the new gflag `data_size_metric_updater_interval_sec`, which is
60 seconds by default.

**Upgrade/Rollback safety:**
Comment-only proto changes.

Jira: DB-11817

Test Plan: `./yb_build.sh release --cxx-test integration-tests_minicluster-snapshot-test --gtest_filter=*TsDataSizeMetricsTest*`

Reviewers: mhaddad

Reviewed By: mhaddad

Subscribers: ybase

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