Skip to content

Commit

Permalink
backward compat
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Mar 1, 2024
1 parent e90e971 commit 5a85fe9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dashboard/pages/fragment_graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,13 @@ export default function Streaming() {
if (actorBackPressures) {
for (const m of actorBackPressures.outputBufferBlockingDuration) {
if (m.sample.length > 0) {
// We issue an instant query to Prometheus to get the most recent value.
// Note: We issue an instant query to Prometheus to get the most recent value.
// So there should be only one sample here.
console.assert(m.sample.length === 1)
const value = m.sample[0].value * 100
//
// Due to https://github.com/risingwavelabs/risingwave/issues/15280, it's still
// possible that an old version of meta service returns a range-query result.
// So we take the one with the latest timestamp here.
const value = _(m.sample).maxBy((s) => s.timestamp)!.value * 100
map.set(
`${m.metric.fragment_id}_${m.metric.downstream_fragment_id}`,
value
Expand Down

0 comments on commit 5a85fe9

Please sign in to comment.