-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feat: Expose subgraph table sizes in SubgraphIndexingStatus #6201
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
base: master
Are you sure you want to change the base?
Feat: Expose subgraph table sizes in SubgraphIndexingStatus #6201
Conversation
987c599 to
6c786c0
Compare
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
6c786c0 to
b1b19cc
Compare
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
|
|
||
| let rows = match result { | ||
| Ok(rows) => rows, | ||
| Err(e) if e.to_string().contains("has not been populated") => Vec::new(), |
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.
Minor nitpick: Is there no typed error for this? string matching might be fragile if diesel changes the error message.
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.
Feel free to ignore if there is no typed error for this
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.
This is a postgre error, and it is returned as Unknown
Unknown(materialized view "subgraph_sizes" has not been populated)
So I don't think there's another way
|
Let's wait for this PR #6194 to be merged before this one, so I can update to async logic |
Resolves #5470
What this PR does:
SubgraphIndexingStatus. The data is collected from thesubgraph_sizesmaterialized view.subgraphsargument for therindexingStatusesquery required. After the changes in handle empty array in indexing status query #6143, calling the query without an argument is redundant because it will always return an empty array.