mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-02 04:50:38 +00:00
storcon: validate intent state before applying optimization (#12593)
## Problem In the gap between picking an optimization and applying it, something might insert a change to the intent state that makes it incompatible. If the change is done via the `schedule()` method, we are covered by the increased sequence number, but otherwise we can panic if we violate the intent state invariants. ## Summary of Changes Validate the optimization right before applying it. Since we hold the service lock at that point, nothing else can sneak in. Closes LKB-65
This commit is contained in:
@@ -73,6 +73,11 @@ def test_sharding_autosplit(neon_env_builder: NeonEnvBuilder, pg_bin: PgBin):
|
||||
".*Local notification hook failed.*",
|
||||
".*Marking shard.*for notification retry.*",
|
||||
".*Failed to notify compute.*",
|
||||
# As an optimization, the storage controller kicks the downloads on the secondary
|
||||
# after the shard split. However, secondaries are created async, so it's possible
|
||||
# that the intent state was modified, but the actual secondary hasn't been created,
|
||||
# which results in an error.
|
||||
".*Error calling secondary download after shard split.*",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user