mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-25 00:50:36 +00:00
test: fix: accidentally re-enabled compaction & gc
This commit is contained in:
@@ -1228,6 +1228,20 @@ class PageserverHttpClient(requests.Session):
|
||||
)
|
||||
self.verbose_error(res)
|
||||
|
||||
def patch_tenant_config_client_side(
|
||||
self,
|
||||
tenant_id: TenantId,
|
||||
inserts: Optional[Dict[str, Any]] = None,
|
||||
removes: Optional[List[str]] = None,
|
||||
):
|
||||
current = self.tenant_config(tenant_id).tenant_specific_overrides
|
||||
if inserts is not None:
|
||||
current.update(inserts)
|
||||
if removes is not None:
|
||||
for key in removes:
|
||||
del current[key]
|
||||
self.set_tenant_config(tenant_id, current)
|
||||
|
||||
def tenant_size(self, tenant_id: TenantId) -> int:
|
||||
return self.tenant_size_and_modelinputs(tenant_id)[0]
|
||||
|
||||
|
||||
@@ -295,8 +295,12 @@ def test_pageserver_respects_overridden_resident_size(eviction_env: EvictionEnv)
|
||||
[du > min_resident_size for du in du_by_timeline.values()]
|
||||
), "ensure the larger tenant will get a haircut"
|
||||
|
||||
ps_http.set_tenant_config(small_tenant[0], {"min_resident_size_override": min_resident_size})
|
||||
ps_http.set_tenant_config(large_tenant[0], {"min_resident_size_override": min_resident_size})
|
||||
ps_http.patch_tenant_config_client_side(
|
||||
small_tenant[0], {"min_resident_size_override": min_resident_size}
|
||||
)
|
||||
ps_http.patch_tenant_config_client_side(
|
||||
large_tenant[0], {"min_resident_size_override": min_resident_size}
|
||||
)
|
||||
|
||||
# Make the large tenant more-recently used. An incorrect implemention would try to evict
|
||||
# from the smaller tenant first, since its layers would be the least-recently-used.
|
||||
|
||||
Reference in New Issue
Block a user