File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
nexus/db-queries/src/db/datastore Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -247,11 +247,20 @@ impl DataStore {
247
247
}
248
248
249
249
sql_function ! ( fn random( ) -> diesel:: sql_types:: Float ) ;
250
+
251
+ // We only actually care about one target here, so this
252
+ // query should have a `.limit(1)` attached. We fetch all
253
+ // sled targets to leave additional debugging information in
254
+ // the logs, for now.
250
255
let sled_targets = sled_targets
251
256
. order ( random ( ) )
252
- . limit ( 1 )
253
257
. get_results_async :: < Uuid > ( & conn)
254
258
. await ?;
259
+ info ! (
260
+ opctx. log,
261
+ "found {} available sled targets" , sled_targets. len( ) ;
262
+ "sled_ids" => ?sled_targets,
263
+ ) ;
255
264
256
265
if sled_targets. is_empty ( ) {
257
266
return Err ( err. bail ( SledReservationError :: NotFound ) ) ;
You can’t perform that action at this time.
0 commit comments