@@ -29,6 +29,7 @@ use crate::{
2929 wire:: { next_request_id, Message } ,
3030 PinnedConnectionHandle ,
3131 } ,
32+ Command ,
3233 ConnectionPool ,
3334 RawCommandResponse ,
3435 StreamDescription ,
@@ -59,7 +60,7 @@ use crate::{
5960 Retryability ,
6061 } ,
6162 options:: { ChangeStreamOptions , SelectionCriteria } ,
62- sdam:: { HandshakePhase , SelectedServer , ServerType , TopologyType , TransactionSupportStatus } ,
63+ sdam:: { HandshakePhase , ServerType , TopologyType , TransactionSupportStatus } ,
6364 selection_criteria:: ReadPreference ,
6465 tracking_arc:: TrackingArc ,
6566 ClusterTime ,
@@ -309,7 +310,7 @@ impl Client {
309310 let mut retry: Option < ExecutionRetry > = None ;
310311 let mut implicit_session: Option < ClientSession > = None ;
311312 loop {
312- op. update_for_topology ( & self . inner . topology . description ( ) ) ;
313+ // op.update_for_topology(&self.inner.topology.description());
313314
314315 if retry. is_some ( ) {
315316 op. update_for_retry ( ) ;
@@ -320,15 +321,15 @@ impl Client {
320321 . and_then ( |s| s. transaction . pinned_mongos ( ) )
321322 . or_else ( || op. selection_criteria ( ) ) ;
322323
323- let server = match self
324+ let ( server, effective_criteria ) = match self
324325 . select_server (
325326 selection_criteria,
326327 op. name ( ) ,
327328 retry. as_ref ( ) . map ( |r| & r. first_server ) ,
328329 )
329330 . await
330331 {
331- Ok ( server ) => server ,
332+ Ok ( out ) => out ,
332333 Err ( mut err) => {
333334 retry. first_error ( ) ?;
334335
@@ -394,13 +395,7 @@ impl Client {
394395 } ;
395396
396397 let details = match self
397- . execute_operation_on_connection (
398- op,
399- & mut conn,
400- & mut session,
401- txn_number,
402- retryability,
403- )
398+ . execute_command_on_connection ( cmd, op, & mut conn, & mut session, retryability)
404399 . await
405400 {
406401 Ok ( output) => ExecutionDetails {
@@ -866,7 +861,7 @@ impl Client {
866861 ( matches ! ( topology_type, TopologyType :: Single ) && server_type. is_available ( ) )
867862 || server_type. is_data_bearing ( )
868863 } ) ) ;
869- let _: SelectedServer = self
864+ let _ = self
870865 . select_server ( Some ( & criteria) , operation_name, None )
871866 . await ?;
872867 Ok ( ( ) )
0 commit comments