Skip to content

Commit d829857

Browse files
W-A-Jamesbaileympearson
authored andcommitted
chore: allow clientBulkWrite to use TimeoutContext (#4251)
1 parent 1ee3f6d commit d829857

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/operations/client_bulk_write/client_bulk_write.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { MongoClientBulkWriteExecutionError, ServerType } from '../../beta';
22
import { ClientBulkWriteCursorResponse } from '../../cmap/wire_protocol/responses';
33
import type { Server } from '../../sdam/server';
44
import type { ClientSession } from '../../sessions';
5+
import { type TimeoutContext } from '../../timeout';
56
import { MongoDBNamespace } from '../../utils';
67
import { CommandOperation } from '../command';
78
import { Aspect, defineAspects } from '../operation';
@@ -43,7 +44,8 @@ export class ClientBulkWriteOperation extends CommandOperation<ClientBulkWriteCu
4344
*/
4445
override async execute(
4546
server: Server,
46-
session: ClientSession | undefined
47+
session: ClientSession | undefined,
48+
timeoutContext: TimeoutContext
4749
): Promise<ClientBulkWriteCursorResponse> {
4850
let command;
4951

@@ -93,7 +95,13 @@ export class ClientBulkWriteOperation extends CommandOperation<ClientBulkWriteCu
9395
if (!this.canRetryWrite) {
9496
this.options.willRetryWrite = false;
9597
}
96-
return await super.executeCommand(server, session, command, ClientBulkWriteCursorResponse);
98+
return await super.executeCommand(
99+
server,
100+
session,
101+
command,
102+
timeoutContext,
103+
ClientBulkWriteCursorResponse
104+
);
97105
}
98106
}
99107

0 commit comments

Comments
 (0)