mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
storage controller: fix handing of tenants with no timelines during scheduling optimization (#7673)
## Problem Storage controller was using a zero layer count in SecondaryProgress as a proxy for "not initialized". However, in tenants with zero timelines (a legitimate state), the layer count remains zero forever. This caused https://github.com/neondatabase/neon/pull/7583 to destabilize the storage controller scale test, which creates lots of tenants, some of which don't get any timelines. ## Summary of changes - Use a None mtime instead of zero layer count to determine if a SecondaryProgress should be ignored. - Adjust the test to use a shorter heatmap upload period to let it proceed faster while waiting for scheduling optimizations to complete.
This commit is contained in:
@@ -102,6 +102,9 @@ def test_storage_controller_many_tenants(
|
||||
tenant_id,
|
||||
shard_count,
|
||||
stripe_size,
|
||||
# Upload heatmaps fast, so that secondary downloads happen promptly, enabling
|
||||
# the controller's optimization migrations to proceed promptly.
|
||||
tenant_config={"heatmap_period": "10s"},
|
||||
placement_policy={"Attached": 1},
|
||||
)
|
||||
futs.append(f)
|
||||
|
||||
Reference in New Issue
Block a user