Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dashboard): list streaming job from streaming_job table & show info #19134

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Oct 25, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

List streaming jobs in dashboard by querying the streaming_job table in meta store, instead of querying different catalog tables separately. This gives more accurate results and extra info about streaming jobs.

image image

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Copy link
Member Author

BugenZhao commented Oct 25, 2024

@BugenZhao BugenZhao changed the title feat(dashboard): show parallelism info for streaming job feat(dashboard): list streaming job from streaming_job table & show parallelism info Oct 28, 2024
Base automatically changed from bz/vnode-dashboard to main October 29, 2024 08:07
@BugenZhao BugenZhao force-pushed the bz/dashboard-list-streaming-job branch from 94e9b41 to 577e162 Compare October 29, 2024 08:24
@BugenZhao BugenZhao changed the title feat(dashboard): list streaming job from streaming_job table & show parallelism info feat(dashboard): list streaming job from streaming_job table & show info Oct 29, 2024
@BugenZhao BugenZhao marked this pull request as ready for review October 29, 2024 08:37
Expr::if_null(
Expr::col((table::Entity, table::Column::Name)),
Expr::if_null(
Expr::col((source::Entity, source::Column::Name)),
Expr::col((sink::Entity, sink::Column::Name)),
),
),
"name",
Copy link
Member Author

Choose a reason for hiding this comment

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

Seems no better way to obtain the job name. 🤡

Copy link
Contributor

Choose a reason for hiding this comment

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

Will there be any dangling shard sources here? 🥵

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a left join, so I guess all sources queried here are shared sources?

Copy link
Member

Choose a reason for hiding this comment

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

🥵 All streaming jobs will be listed, including those being Creating. Is this by design? Add FYI for replace table we will have a dummy record in streaming_job table that doesn't have any associated catalogs in other tables.

Copy link
Member Author

Choose a reason for hiding this comment

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

including those being Creating

I think this can be useful for debugging and is frequently asked: #19044

Copy link
Member Author

Choose a reason for hiding this comment

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

for replace table we will have a dummy record

This is just a temporary state I suppose, so perhaps it won't be too much problem. 🥺

Copy link
Member

@yezizp2012 yezizp2012 Oct 29, 2024

Choose a reason for hiding this comment

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

I guess it will cause panic because the name will be NULL and can't be mapped to String in partial model StreamingJobInfo.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if the following filter works or not. You can give it a try.

.filter(Expr::col(Alias::new("name")).is_not_null())

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a fallback of <unknown>

@@ -53,14 +54,6 @@ export async function getRelationIdInfos(): Promise<RelationIdInfos> {
return fragmentIds
}

export async function getFragments(): Promise<TableFragments[]> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Dead after #18272

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM!

@BugenZhao BugenZhao force-pushed the bz/dashboard-list-streaming-job branch from 0e717ab to c10a54b Compare October 30, 2024 06:26
@BugenZhao BugenZhao enabled auto-merge October 30, 2024 06:26
@BugenZhao BugenZhao added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit 18bf666 Oct 30, 2024
32 of 33 checks passed
@BugenZhao BugenZhao deleted the bz/dashboard-list-streaming-job branch October 30, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants