-
Notifications
You must be signed in to change notification settings - Fork 684
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: add a debug page with basic information about split store #10182
Conversation
Add a debug endpoint which provides information about the split store. I reused the implementation that is used for the jsonrpc endpoint `EXPERIMENTAL_split_storage_info`. This new endpoint will be used by a debug page to display information about the split store.
Add a new page: /debug/pages/split_store. This page provides basic information about the state of split store. An example report looks like this: ``` Cold head height: null Final head height: 1831 Head height: 1833 Hot db kind: RPC ``` Fixes: near#9549
Tbf I'm not entirely sure about this solution. I still don't understand what the cold store does, why is it even needed? I looked around a bit but couldn't find a clear explanation. |
Looks like wacban is on top of this. Removing myself from reviewers. |
I can't find good documentation on that topic but perhaps @posvyatokum or @andrei-near will know.
|
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
// Implementing From<RpcSplitStorageInfoError> for RpcStatusError causes cargo to spit out hundreds | ||
// of lines of compilation errors. I don't want to spend time debugging this, so let's use this function instead. | ||
// It's good enough. |
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.
lol
if you want we can try together, for the sake of learing rust but as you said it's just fine as is
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.
Eh I'm fine with leaving it as is. The errors looked pretty intimidating, and there is no point in spending mental energy on trying to figure out what it is complaining about. "Focus on what matters", right? :P
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.
I'd even argue that into_rpc_status_error
is more readable than just into
:P
Ahh, thanks, it starts making sense now :) I think I saw something similar before, but it was done using something like |
Add a new debug page:
/debug/pages/split_store
This page provides basic information about the state of split store.
An example report looks like this:
Fixes: #9549