From 6c3fc3f3a26aea4ec208b727aaf501214f9fc6ed Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 13 Sep 2024 20:57:10 -0400 Subject: [PATCH] Don't call `pool_connection_authorized` here! (#6579) Don't use `pool_connection_authorized` from within `transaction_async`'s function, use the `conn` that is supplied for this purpose. I don't know how bad this is (will CRDB just nest things?) but it strikes me as wrong, so here's the PR! --- .../src/db/datastore/region_snapshot_replacement.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nexus/db-queries/src/db/datastore/region_snapshot_replacement.rs b/nexus/db-queries/src/db/datastore/region_snapshot_replacement.rs index 5f99129ecd..d6a43edbfe 100644 --- a/nexus/db-queries/src/db/datastore/region_snapshot_replacement.rs +++ b/nexus/db-queries/src/db/datastore/region_snapshot_replacement.rs @@ -894,9 +894,7 @@ impl DataStore { .check_if_exists::( region_snapshot_replacement_step_id, ) - .execute_and_check( - &*self.pool_connection_authorized(opctx).await?, - ) + .execute_and_check(&conn) .await?; match result.status {