mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 04:52:55 +00:00
feat(pageserver): add db rel count as feature flag property (#12632)
## Problem As part of the reldirv2 rollout: LKB-197. We will use number of db/rels as a criteria whether to rollout reldirv2 directly on the write path (simplest and easiest way of rollout). If the number of rel/db is small then it shouldn't take too long time on the write path. ## Summary of changes * Compute db/rel count during basebackup. * Also compute it during logical size computation. * Collect maximum number of db/rel across all timelines in the feature flag propeties. --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
@@ -50,11 +50,15 @@ def test_feature_flag(neon_env_builder: NeonEnvBuilder):
|
||||
)["result"]
|
||||
)
|
||||
|
||||
env.endpoints.create_start("main") # trigger basebackup
|
||||
env.pageserver.http_client().force_refresh_feature_flag(env.initial_tenant)
|
||||
|
||||
# Check if the properties exist
|
||||
result = env.pageserver.http_client().evaluate_feature_flag_multivariate(
|
||||
env.initial_tenant, "test-feature-flag"
|
||||
)
|
||||
|
||||
assert "tenant_remote_size_mb" in result["properties"]
|
||||
assert "tenant_db_count_max" in result["properties"]
|
||||
assert "tenant_rel_count_max" in result["properties"]
|
||||
assert "tenant_id" in result["properties"]
|
||||
|
||||
Reference in New Issue
Block a user