-
Notifications
You must be signed in to change notification settings - Fork 590
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
perf(dashboard): only fetch ids and specified fragments for a relation #18272
Conversation
proto/meta.proto
Outdated
message RelationIdInfos { | ||
// relation_id -> FragmentIdToActorIdMap | ||
map<uint32, FragmentIdToActorIdMap> map = 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a new proto for it to make it easier to work with on the web frontend side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#18272) (#18298) Co-authored-by: Noel Kwan <[email protected]>
for (const relationId in map) { | ||
const fragmentIdToRelationId = map[relationId].map | ||
for (const fragmentId in fragmentIdToRelationId) { | ||
if (parseInt(fragmentId) == searchFragIdInt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: searchFragId can be used in the comparison so that we save parseInt
call.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Previously we fetch all fragments across all relations. Then we use it to:
In this PR we refactor it into:
TableFragments
for the specifiedrelation_id
on demand.Part of #18176
Checklist
./risedev check
(or alias,./risedev c
)Documentation
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.