You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sessions.ts
+30-2Lines changed: 30 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ import { PromiseProvider } from './promise_provider';
2
2
import { Binary, Long, Timestamp, Document } from './bson';
3
3
import { ReadPreference } from './read_preference';
4
4
import { isTransactionCommand, TxnState, Transaction, TransactionOptions } from './transactions';
5
-
import { resolveClusterTime, ClusterTime } from './sdam/common';
5
+
import { _advanceClusterTime, ClusterTime } from './sdam/common';
6
6
import { isSharded } from './cmap/wire_protocol/shared';
7
7
import {
8
8
MongoError,
@@ -249,6 +249,34 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
249
249
}
250
250
}
251
251
252
+
/**
253
+
* Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession
254
+
*
255
+
* @param clusterTime - the $clusterTime returned by the server from another session in the form of a document containing the `BSON.Timestamp` clusterTime and signature
0 commit comments