Repository navigation
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 ( |
1492640 to
ae5cc95
Compare
| <VStack spacing={4} alignItems="stretch"> | ||
| <HStack spacing={2} alignItems="baseline" flexWrap="wrap"> | ||
| <Text as="h3" textStyle="heading-sm"> | ||
| Top {TOP_OBJECT_COUNT} objects by memory |
There was a problem hiding this comment.
nit: "Top 10" implies there are more than 10, but it also shows when there are fewer (the test fixture has 2). Suggest "Objects by Memory" when there are fewer than TOP_OBJECT_COUNT, and "Top 10 Objects by Memory" otherwise. Also Title Case, to match "Resource Usage" above.
| Top {TOP_OBJECT_COUNT} objects by memory | |
| {objects.length < TOP_OBJECT_COUNT | |
| ? "Objects by Memory" | |
| : `Top ${TOP_OBJECT_COUNT} Objects by Memory`} |
There was a problem hiding this comment.
Applied, with your test changes, in 3957f75.
| ); | ||
| await renderMemoryByObject(); | ||
|
|
||
| expect(await screen.findByText("Top 10 objects by memory")).toBeVisible(); |
There was a problem hiding this comment.
Goes with the heading suggestion on MemoryByObject.tsx: the 2-object fixture is fewer than TOP_OBJECT_COUNT, so the heading becomes "Objects by Memory". Commit both together, or this test fails.
| expect(await screen.findByText("Top 10 objects by memory")).toBeVisible(); | |
| expect(await screen.findByText("Objects by Memory")).toBeVisible(); |
| server.use(largestReplicaHandler([])); | ||
| await renderMemoryByObject(); | ||
|
|
||
| expect(screen.queryByText(/objects by memory/)).not.toBeInTheDocument(); |
There was a problem hiding this comment.
Also goes with the heading suggestion: this regex is case-sensitive, so after the Title Case change it would match neither heading and the assertion would pass even if one rendered. /Objects by Memory/ matches both forms.
| expect(screen.queryByText(/objects by memory/)).not.toBeInTheDocument(); | |
| expect(screen.queryByText(/Objects by Memory/)).not.toBeInTheDocument(); |
ae5cc95 to
f6bfc47
Compare
1cd434f to
cd0fecc
Compare
a652d45 to
3957f75
Compare
QA LLM Review1. MEDIUM -- Bar's 100% is one process's heap limit, but object sizes span every process
The card treats each object's DetailsThe denominator is Example: a The classic table already showed the inflated percentage for each row. The new part is the stacked 0–100% axis, plus the clamp that hides the overflow. A fix is to use the replica's total heap as the denominator, for example |
3957f75 to
b322b4d
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.
b322b4d to
a66742d
Compare


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
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.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. Not included from the design: the replica dropdown. The card uses the largest replica, as the table did.
Verification
MemoryByObject.test.tsxcovers:LargestMaintainedQueries.test.tsxpasses unchanged after the shared boundary moved out.largestClusterReplica.test.sql.tscovers a replica whose size runs four processes.🤖 Generated with Claude Code