mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
This patch adds support for updating per-table metrics. It introduces a helper function that retrieves the stats object from a table schema. The code uses a lw_shared_ptr for the stats object to ensure safe updates even if the table holding it has been deleted. There is some duplication in the updated code, as both per-shard and per-table metrics are updated. The rmw_operation::execute function now accepts two stats objects: one for the global metrics and one for the per-table metrics. The use of execute was also modified—rather than modifying the WCU directly, a parameter is used so both global and per-table stats can be updated. Signed-off-by: Amnon Heiman <amnon@scylladb.com>
290 KiB
290 KiB