Skip to content

Commit

Permalink
[nexus] Remove SELECT FOR UPDATE, patch tests (#6729)
Browse files Browse the repository at this point in the history
Building off of:

-
#6229 (comment)
- #6694
- https://github.com/oxidecomputer/sqldance

This PR acknowledges that `SELECT FOR UPDATE` is a performance
"optimization" in the situation where a blueprint's value is checked
before performing a subsequent operation, as we do with setting network
resources. It arguably could make performance worse in certain cases, as
it locks out concurrent read operations from accessing the database.

This PR removes the usage of `SELECT FOR UPDATE`, and significantly
overhauls the `test_ensure_external_networking_bails_on_bad_target` test
to account for the concurrent control that CockroachDB may be performing
with respect to operation re-ordering.

---------

Co-authored-by: John Gallagher <[email protected]>
  • Loading branch information
smklein and jgallagher authored Oct 1, 2024
1 parent f14b561 commit 33c83aa
Showing 1 changed file with 286 additions and 173 deletions.
Loading

0 comments on commit 33c83aa

Please sign in to comment.