mirror of
https://github.com/neondatabase/neon.git
synced 2026-08-12 09:19:39 +00:00
feat(pageserver): add force patch index_part API (#11119)
## Problem As part of the disaster recovery tool. Partly for https://github.com/neondatabase/neon/issues/9114. ## Summary of changes * Add a new pageserver API to force patch the fields in index_part and modify the timeline internal structures. --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
@@ -375,6 +375,19 @@ class PageserverHttpClient(requests.Session, MetricsGetter):
|
||||
res = self.post(f"http://localhost:{self.port}/v1/tenant/{tenant_id}/reset", params=params)
|
||||
self.verbose_error(res)
|
||||
|
||||
def timeline_patch_index_part(
|
||||
self,
|
||||
tenant_id: TenantId | TenantShardId,
|
||||
timeline_id: TimelineId,
|
||||
data: dict[str, Any],
|
||||
):
|
||||
res = self.post(
|
||||
f"http://localhost:{self.port}/v1/tenant/{tenant_id}/timeline/{timeline_id}/patch_index_part",
|
||||
json=data,
|
||||
)
|
||||
self.verbose_error(res)
|
||||
return res.json()
|
||||
|
||||
def tenant_location_conf(
|
||||
self,
|
||||
tenant_id: TenantId | TenantShardId,
|
||||
|
||||
Reference in New Issue
Block a user