Skip to content

Commit 46686b8

Browse files
clarifying comment
1 parent 3dad6c2 commit 46686b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sessions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,9 @@ export class ClientSession
788788
await this.commitTransaction();
789789
committed = true;
790790
} catch (commitError) {
791-
// If CSOT is enabled, we repeatedly retry until timeoutMS expires.
791+
// If CSOT is enabled, we repeatedly retry until timeoutMS expires. This is enforced by providing a
792+
// timeoutContext to each async API, which know how to cancel themselves (i.e., the next retry will
793+
// abort the withTransaction call).
792794
// If CSOT is not enabled, do we still have time remaining or have we timed out?
793795
const hasNotTimedOut =
794796
this.timeoutContext?.csotEnabled() || now() - startTime < MAX_TIMEOUT;

0 commit comments

Comments
 (0)