refactor: use streaming in safekeeper /v1/debug_dump http response (#5731)

- Update the handler for `/v1/debug_dump` http response in safekeeper
- Update the `debug_dump::build()` to use the streaming in JSON build
process
This commit is contained in:
duguorong009
2023-11-05 05:16:54 -05:00
committed by GitHub
parent 306c4f9967
commit 09b5954526
7 changed files with 227 additions and 126 deletions

View File

@@ -2868,7 +2868,7 @@ class SafekeeperHttpClient(requests.Session):
params = params or {}
res = self.get(f"http://localhost:{self.port}/v1/debug_dump", params=params)
res.raise_for_status()
res_json = res.json()
res_json = json.loads(res.text)
assert isinstance(res_json, dict)
return res_json