-
Notifications
You must be signed in to change notification settings - Fork 38
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
docs: for metasrv maintenance endpoints #878
Conversation
Deploying greptime-docs with Cloudflare Pages
|
Lack of Chinese version. |
Signed-off-by: tison <wander4096@gmail.com>
@MichaelScofield Updated. The previous "Chinese version" written in English so I follow the pattern for now 🤣 cc @nicecui |
But why is the Chinese version also written in English? |
I think it's for historical reason. We should do a follow-up to translate all of admin-api to Chinese. But I tend not to block this PR. |
Or I can translate the new added content anyway. |
that's a historical problem, pls translate the new content to Chinese, thank you very much! |
@nicecui I can schedule to do it in this week, but in another PR. Just don't like to couple multiple things in one PR .. |
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.
Maybe it is a bit late to discuss the APIs in this document PR...However /maintenance
and /maintenance/set
are not following the RESTful style of APIs...They should be:
# Get the maintenance status
GET /maintenance
# Modify the maintenance status
PUT /maintenance {status:true}
Then we can write the document as the following:
## /maintenance HTTP endpoint
The metasrv will ignore detected region failures when under maintenance. This is useful when the datanodes are planned to be unavailable for a short period of time; for example, rolling upgrade for datanodes.
### GET
The `/maintenance` endpoint accepts GET HTTP requests and you can use this endpoint to query the maintenance status of your metasrv instance.
curl -X GET http://localhost:3002/admin/maintenance
### POST
.....
@nicecui our #[async_trait::async_trait]
pub trait HttpHandler: Send + Sync {
async fn handle(
&self,
path: &str,
params: &HashMap<String, String>,
) -> crate::Result<http::Response<String>>;
} |
But we can change it anyway. |
DB side changed. Let me update the docs today .. |
Generally we should add this doc to v0.8 :D |
Signed-off-by: tison <wander4096@gmail.com>
@MichaelScofield @nicecui Updated. |
Co-authored-by: Yiran <cuiyiran3@gmail.com>
@nicecui Thanks for the good catches. Updated. |
What's Changed in this PR
This closes #848.
Checklist
summary.yml
matches the current document structure when you changed the document structure.