File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed
Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ import {
4242 commandSupportsReadConcern ,
4343 isPromiseLike ,
4444 List ,
45- maxWireVersion ,
4645 MongoDBNamespace ,
4746 noop ,
4847 now ,
@@ -51,8 +50,6 @@ import {
5150} from './utils' ;
5251import { WriteConcern , type WriteConcernOptions , type WriteConcernSettings } from './write_concern' ;
5352
54- const minWireVersionForShardedTransactions = 8 ;
55-
5653/** @public */
5754export interface ClientSessionOptions {
5855 /** Whether causal consistency should be enabled on this session */
@@ -405,17 +402,6 @@ export class ClientSession
405402 this . unpin ( ) ;
406403 }
407404
408- const topologyMaxWireVersion = maxWireVersion ( this . client . topology ) ;
409- if (
410- isSharded ( this . client . topology ) &&
411- topologyMaxWireVersion != null &&
412- topologyMaxWireVersion < minWireVersionForShardedTransactions
413- ) {
414- throw new MongoCompatibilityError (
415- 'Transactions are not supported on sharded clusters in MongoDB < 4.2.'
416- ) ;
417- }
418-
419405 this . commitAttempted = false ;
420406 // increment txnNumber
421407 this . incrementTransactionNumber ( ) ;
You can’t perform that action at this time.
0 commit comments