@@ -505,24 +505,6 @@ func (op Operation) Execute(ctx context.Context) error {
505
505
}
506
506
507
507
desc := description.SelectedServer {Server : conn .Description (), Kind : op .Deployment .Kind ()}
508
- if desc .WireVersion == nil || desc .WireVersion .Max < 4 {
509
- switch op .Legacy {
510
- case LegacyFind :
511
- return op .legacyFind (ctx , (* wm )[:0 ], srvr , conn , desc , maxTimeMS )
512
- case LegacyGetMore :
513
- return op .legacyGetMore (ctx , (* wm )[:0 ], srvr , conn , desc )
514
- case LegacyKillCursors :
515
- return op .legacyKillCursors (ctx , (* wm )[:0 ], srvr , conn , desc )
516
- }
517
- }
518
- if desc .WireVersion == nil || desc .WireVersion .Max < 3 {
519
- switch op .Legacy {
520
- case LegacyListCollections :
521
- return op .legacyListCollections (ctx , (* wm )[:0 ], srvr , conn , desc )
522
- case LegacyListIndexes :
523
- return op .legacyListIndexes (ctx , (* wm )[:0 ], srvr , conn , desc , maxTimeMS )
524
- }
525
- }
526
508
527
509
if batching {
528
510
targetBatchSize := desc .MaxDocumentSize
@@ -830,7 +812,6 @@ func (op Operation) retryable(desc description.Server) bool {
830
812
return true
831
813
}
832
814
if retryWritesSupported (desc ) &&
833
- desc .WireVersion != nil && desc .WireVersion .Max >= 6 &&
834
815
op .Client != nil && ! (op .Client .TransactionInProgress () || op .Client .TransactionStarting ()) &&
835
816
writeconcern .AckWrite (op .WriteConcern ) {
836
817
return true
@@ -839,8 +820,7 @@ func (op Operation) retryable(desc description.Server) bool {
839
820
if op .Client != nil && (op .Client .Committing || op .Client .Aborting ) {
840
821
return true
841
822
}
842
- if desc .WireVersion != nil && desc .WireVersion .Max >= 6 &&
843
- (op .Client == nil || ! (op .Client .TransactionInProgress () || op .Client .TransactionStarting ())) {
823
+ if op .Client == nil || ! (op .Client .TransactionInProgress () || op .Client .TransactionStarting ()) {
844
824
return true
845
825
}
846
826
}
0 commit comments