review cleanups

This commit is contained in:
Dmitry Rodionov
2021-10-27 12:19:41 +03:00
committed by Dmitry Rodionov
parent 5bc09074ea
commit 1c0e85f9a0
2 changed files with 5 additions and 4 deletions

View File

@@ -96,10 +96,9 @@ fn get_include_non_incremental_logical_size(request: &Request<Body>) -> bool {
.map(|v| {
url::form_urlencoded::parse(v.as_bytes())
.into_owned()
.position(|(param, _)| param == "include-non-incremental-logical-size")
.any(|(param, _)| param == "include-non-incremental-logical-size")
})
.flatten()
.is_some()
.unwrap_or(false)
}
async fn branch_list_handler(request: Request<Body>) -> Result<Response<Body>, ApiError> {

View File

@@ -630,7 +630,9 @@ impl postgres_backend::Handler for PageServerHandler {
let tenantid = ZTenantId::from_str(caps.get(1).unwrap().as_str())?;
let branches = crate::branches::get_branches(self.conf, &tenantid, true)?;
// since these handlers for tenant/branch commands are deprecated (in favor of http based ones)
// just use false in place of include non incremental logical size
let branches = crate::branches::get_branches(self.conf, &tenantid, false)?;
let branches_buf = serde_json::to_vec(&branches)?;
pgb.write_message_noflush(&SINGLE_COL_ROWDESC)?