@@ -4,14 +4,13 @@ import { CursorResponse, ExplainedCursorResponse } from '../cmap/wire_protocol/r
44import { type CursorTimeoutMode } from '../cursor/abstract_cursor' ;
55import { MongoInvalidArgumentError } from '../error' ;
66import { type ExplainOptions } from '../explain' ;
7- import { maxWireVersion , type MongoDBNamespace } from '../utils' ;
7+ import { type MongoDBNamespace } from '../utils' ;
88import { WriteConcern } from '../write_concern' ;
99import { type CollationOptions , CommandOperation , type CommandOperationOptions } from './command' ;
1010import { Aspect , defineAspects , type Hint } from './operation' ;
1111
1212/** @internal */
1313export const DB_AGGREGATE_COLLECTION = 1 as const ;
14- const MIN_WIRE_VERSION_$OUT_READ_CONCERN_SUPPORT = 8 ;
1514
1615/** @public */
1716export interface AggregateOptions extends Omit < CommandOperationOptions , 'explain' > {
@@ -109,13 +108,8 @@ export class AggregateOperation extends CommandOperation<CursorResponse> {
109108
110109 override buildCommandDocument ( connection : Connection ) : Document {
111110 const options = this . options ;
112- const serverWireVersion = maxWireVersion ( connection ) ;
113111 const command : Document = { aggregate : this . target , pipeline : this . pipeline } ;
114112
115- if ( this . hasWriteStage && serverWireVersion < MIN_WIRE_VERSION_$OUT_READ_CONCERN_SUPPORT ) {
116- this . readConcern = undefined ;
117- }
118-
119113 if ( this . hasWriteStage && this . writeConcern ) {
120114 WriteConcern . apply ( command , this . writeConcern ) ;
121115 }
0 commit comments