We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dad5bee commit c875ac8Copy full SHA for c875ac8
src/sessions.ts
@@ -169,8 +169,10 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
169
this[kServerSession] = this.explicit ? this.sessionPool.acquire() : null;
170
this[kTxnNumberIncrement] = 0;
171
172
+ const canEnableCausalConsistency = this.explicit && options.snapshot !== true;
173
this.supports = {
- causalConsistency: options.snapshot !== true && options.causalConsistency !== false
174
+ // if we can enable causal consistency, do so by default
175
+ causalConsistency: canEnableCausalConsistency && options.causalConsistency !== false
176
};
177
178
this.clusterTime = options.initialClusterTime;
0 commit comments