Skip to content

feat(new_metrics): support server_stat command showing some important server-level metrics (part 3)#2385

Merged
empiredan merged 3 commits intoapache:masterfrom
empiredan:new-metrics-server-stat-rdb
Mar 18, 2026
Merged

feat(new_metrics): support server_stat command showing some important server-level metrics (part 3)#2385
empiredan merged 3 commits intoapache:masterfrom
empiredan:new-metrics-server-stat-rdb

Conversation

@empiredan
Copy link
Copy Markdown
Contributor

#2382

Add metrics related to the number of RocksDB as the 3rd part to be shown by
server_stat command.

Copy link
Copy Markdown

@acelyc111-bot acelyc111-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: server_stat metrics expansion

Summary: Adds 3 new metrics to the command output: , , and . Also expands entity filter to include type.

What's good:

  • Clean, consistent implementation — follows existing patterns for struct fields, JSON serialization, and aggregation
  • Proper use of for replica-level metrics being aggregated across nodes
  • Minimal, focused change (1 file, +45/-14)

Notes:

  • The is fetched from the entity but the other two compaction metrics come from entity — this is correct since block cache is shared at server level while compaction tasks are per-replica, but worth documenting
  • No unit tests added — consider adding a test for the JSON serialization roundtrip if there's an existing test file for this

Verdict: ✅ Approve — Looks ready to merge. Clean implementation, follows existing conventions.

Copy link
Copy Markdown

@acelyc111-bot acelyc111-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: server_stat metrics expansion

Summary: Adds 3 new metrics to the server_stat command output: rdb_block_cache_mem_usage_bytes, rdb_manual_compact_queued_tasks, and rdb_manual_compact_running_tasks. Also expands entity filter to include replica type.

What's good:

  • Clean, consistent implementation — follows existing patterns for struct fields, JSON serialization, and aggregation
  • Proper use of create_sums for replica-level metrics being aggregated across nodes
  • Minimal, focused change (1 file, +45/-14)

Notes:

  • The block cache metric is fetched from the server entity while compaction metrics come from replica entity — correct design, but could use a comment explaining the distinction
  • No unit tests added — consider adding a test for the JSON serialization roundtrip if there's an existing test file for this

Verdict: ✅ Approve — Looks ready to merge. Clean implementation, follows existing conventions.

@empiredan empiredan marked this pull request as ready for review March 16, 2026 10:17
@empiredan empiredan merged commit d14bfae into apache:master Mar 18, 2026
252 of 255 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants