File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -513,11 +513,13 @@ impl ConnectionPoolWorker {
513
513
handler. handle_pool_cleared_event ( event) ;
514
514
} ) ;
515
515
516
- for request in self . wait_queue . drain ( ..) {
517
- // an error means the other end hung up already, which is okay because we were
518
- // returning an error anyways
519
- let _: std:: result:: Result < _ , _ > =
520
- request. fulfill ( ConnectionRequestResult :: PoolCleared ( cause. clone ( ) ) ) ;
516
+ if !matches ! ( self . generation, PoolGeneration :: LoadBalanced ( _) ) {
517
+ for request in self . wait_queue . drain ( ..) {
518
+ // an error means the other end hung up already, which is okay because we were
519
+ // returning an error anyways
520
+ let _: std:: result:: Result < _ , _ > =
521
+ request. fulfill ( ConnectionRequestResult :: PoolCleared ( cause. clone ( ) ) ) ;
522
+ }
521
523
}
522
524
}
523
525
}
Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ async fn retry_read_pool_cleared() {
91
91
println ! ( "skipping retry_read_pool_cleared due to blockConnection not being supported" ) ;
92
92
return ;
93
93
}
94
+ if client. is_load_balanced ( ) {
95
+ println ! ( "skipping retry_read_pool_cleared due to load-balanced topology" ) ;
96
+ return ;
97
+ }
94
98
95
99
let collection = client
96
100
. database ( "retry_read_pool_cleared" )
Original file line number Diff line number Diff line change @@ -422,6 +422,11 @@ async fn retry_write_pool_cleared() {
422
422
return ;
423
423
}
424
424
425
+ if client. is_load_balanced ( ) {
426
+ println ! ( "skipping retry_write_pool_cleared due to load-balanced topology" ) ;
427
+ return ;
428
+ }
429
+
425
430
let collection = client
426
431
. database ( "retry_write_pool_cleared" )
427
432
. collection ( "retry_write_pool_cleared" ) ;
You can’t perform that action at this time.
0 commit comments