Repository navigation
console: add a memory by object card to the redesigned cluster page - #39510
Conversation
51e5abe to
32c8f7d
Compare
32c8f7d to
9c821e9
Compare
9c821e9 to
66f1ba1
Compare
f4c71cc to
e754e35
Compare
82c98dc to
31eae67
Compare
49a342f to
a7b956d
Compare
| <VStack spacing={4} alignItems="stretch"> | ||
| <HStack spacing={2} alignItems="baseline" flexWrap="wrap"> | ||
| <Text as="h3" textStyle="heading-sm"> | ||
| Memory consumption by object ({objects.length}) |
There was a problem hiding this comment.
The count is the number the query returns, which caps at 10, so a cluster with hundreds of objects shows "(10)". Something like "Top 10 objects by memory" would avoid reading it as a total.
There was a problem hiding this comment.
Changed to "Top 10 objects by memory".
a7b956d to
792d44c
Compare
I have a followup PR coming to remove this Freshness section so you can add your Freshness tab/ graph once your page is shipped and I agree that we can use the Freshness Swatch legend |
792d44c to
1492640
Compare
|
Thanks. This PR now colors the card's objects by rank with the Freshness page's palette ( |
4d5b210 to
a11a8cd
Compare
a11a8cd to
fe36754
Compare
fe36754 to
c78babc
Compare
6076e1a to
f712927
Compare
2723318 to
a9f5a42
Compare
a9f5a42 to
09347d7
Compare
09347d7 to
6ee99fb
Compare
6ee99fb to
d991319
Compare
QA LLM Review1. MEDIUM -- After one load error the card ignores the Replica select and blames whichever replica is picked next
The card now follows the page's Replica select, but DetailsSentry's I reproduced this with a vitest probe at this head. A fix is to key the boundary by selection, for example |
d991319 to
ffc7a58
Compare
335a591 to
1b57241
Compare
Fourth in the cluster details redesign stack. On the new page's Metrics tab, a memory by object card replaces the resource intensive objects table. It reads the same query: the largest objects on the cluster's largest replica, as shares of that replica's heap limit. One bar of the heap limit is split by object, and a legend gives each object's size and share. Objects are colored by rank with the Freshness page's palette. The design plots this over time, but per-object memory is only reported as a current value by default (mz_object_arrangement_size_history isn't collected unless arrangement_size_history_collection_interval is set), so the card shows the current snapshot. Each object links to its Maintained Objects drawer, or to its workflow graph while the maintained-objects-ui-50 flag is off. The largest replica's loading and error states move into LargestReplicaBoundary so the classic table and the card share them. The largest replica's heap limit now covers all of its processes: the per-process limit times the size's process count from mz_cluster_replica_sizes. Object sizes are replica-wide, so on a multi-process replica every share was inflated by the process count, in the classic table too.


Motivation
Fourth PR in the cluster details redesign stack, on top of #39508. The design replaces the resource intensive objects table with a memory by object chart, so the Metrics tab shows where a replica's memory goes next to the resource usage card. Fixes CNS-175
Description
LargestReplicaBoundaryandbuildLargestClusterReplicaQuerytake an optional replica name, which reads that replica with the same heap limit.generateRainbowPalette).maintained-objects/:objectId). Whilemaintained-objects-ui-50is off that route doesn't exist, so the link goes to the object's workflow graph, as the table's rows did. A dropped object's dataflow keeps its name and has no link.LargestMaintainedQueriesintoLargestReplicaBoundary, which the table and the card share. The boundary takes an optional wrapper for its fallbacks, which the card uses for its frame.heap_limittimes the size's process count frommz_cluster_replica_sizes. Object sizes are replica-wide, so on a multi-process replica every share was inflated by the process count, which also affected the classic table. The process count comes from the size rather than a sum overmz_cluster_replica_metricsrows, because a process whose metrics fetch failed has no limit to sum. Checked on a staging environment: a 2-process replica's limit doubles, and EXPLAIN adds only a differential join onmz_cluster_replica_sizes_ind.The design plots memory by object over time. Per-object memory is only reported as a current value by default:
mz_object_arrangement_size_historyisn't collected unlessarrangement_size_history_collection_intervalis set, and it samples too coarsely for short windows. So the card shows the current snapshot for now.Not carried over from the table: the freshness column and the hint that memory grows until hydration finishes. The card follows #39508's Replica select rather than having its own dropdown.
Verification
MemoryByObject.test.tsxcovers:mz_object_arrangement_sizeson v26.35 and later, with a dropped object labelled by its id;LargestMaintainedQueries.test.tsxpasses unchanged after the shared boundary moved out.largestClusterReplica.test.sql.tscovers a replica whose size runs four processes, and a named replica read with its own heap limit.🤖 Generated with Claude Code