Skip to content

Commit

Permalink
Limit size of the search range for VNIs when creating VPCs (#4298)
Browse files Browse the repository at this point in the history
- Fixes #4283.
- Adds a relatively small limit to the `NextItem` query used for finding
a free VNI during VPC creation. This limits the memory consumption to
something very reasonable, but is big enough that we should be extremely
unlikely to find _no_ available VNIs in the range.
- Add an application-level retry loop when inserting _customer_ VPCs,
which catches the unlikely event that there really are no VNIs
available, and retries a few times.
- Adds tests for the computation of the limited search range.
- Adds tests for the actual exhaustion-detection and retry behavior.
  • Loading branch information
bnaecker authored Oct 21, 2023
1 parent 132efac commit aef679c
Show file tree
Hide file tree
Showing 5 changed files with 565 additions and 47 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nexus/db-queries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ serde_urlencoded.workspace = true
serde_with.workspace = true
sled-agent-client.workspace = true
slog.workspace = true
static_assertions.workspace = true
steno.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = [ "full" ] }
Expand Down
Loading

0 comments on commit aef679c

Please sign in to comment.