add a flag to avoid non incremental size calculation in pageserver http api

This calculation is not that heavy but it is needed only in tests, and
in case the number of tenants/timelines is high the calculation can take
noticeable time.

Resolves https://github.com/zenithdb/zenith/issues/804
This commit is contained in:
Dmitry Rodionov
2021-10-27 00:55:32 +03:00
committed by Dmitry Rodionov
parent 1fac4a3c91
commit 5bc09074ea
7 changed files with 72 additions and 12 deletions

View File

@@ -610,7 +610,9 @@ class ZenithPageserverHttpClient(requests.Session):
return res_json
def branch_detail(self, tenant_id: uuid.UUID, name: str) -> Dict[Any, Any]:
res = self.get(f"http://localhost:{self.port}/v1/branch/{tenant_id.hex}/{name}", )
res = self.get(
f"http://localhost:{self.port}/v1/branch/{tenant_id.hex}/{name}?include-non-incremental-logical-size=1",
)
res.raise_for_status()
res_json = res.json()
assert isinstance(res_json, dict)