We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e798fd8 commit 6a0af2bCopy full SHA for 6a0af2b
1 file changed
src/operations/execute_operation.ts
@@ -349,6 +349,15 @@ async function executeOperationWithRetries<
349
session.unpin({ force: true, forceClear: true });
350
}
351
352
+ if (
353
+ operationError.hasErrorLabel(MongoErrorLabel.SystemOverloadedError) &&
354
+ session != null &&
355
+ session.isPinned &&
356
+ !session.inTransaction()
357
+ ) {
358
+ session.unpin({ force: true });
359
+ }
360
+
361
if (
362
topology.description.type === TopologyType.Sharded ||
363
operationError.hasErrorLabel(MongoErrorLabel.SystemOverloadedError)
0 commit comments