Skip to content

Commit fbb85b7

Browse files
committed
Revert "fix: respect client retryability settings"
This reverts commit 998d80f.
1 parent 998d80f commit fbb85b7

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/operations/execute_operation.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,12 @@ async function executeOperationWithRetries<
389389
);
390390

391391
function canRetry(operation: AbstractOperation, error: MongoError) {
392-
// SystemOverloadedError is retryable, but still must respect retryReads/retryWrites settings
392+
// always retryable
393393
if (
394394
error.hasErrorLabel(MongoErrorLabel.SystemOverloadedError) &&
395395
error.hasErrorLabel(MongoErrorLabel.RetryableError)
396396
) {
397-
// runCommand requires BOTH retryReads and retryWrites to be enabled (per spec)
398-
if (operation instanceof RunCommandOperation) {
399-
return willRetryRead && willRetryWrite;
400-
}
401-
402-
// For other operations, check if retries are enabled for the operation type
403-
return (hasReadAspect && willRetryRead) || (hasWriteAspect && willRetryWrite);
397+
return true;
404398
}
405399

406400
// run command is only retryable if we get retryable overload errors

test/integration/client-backpressure/client-backpressure.spec.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { type Test } from '../../tools/unified-spec-runner/schema';
44

55
const skippedTests = {
66
'collection.dropIndexes retries at most maxAttempts=5 times':
7-
'TODO(NODE-6517): dropIndexes squashes all errors other than ns not found',
8-
'collection.dropIndexes (write) does not retry if retryWrites=false':
97
'TODO(NODE-6517): dropIndexes squashes all errors other than ns not found'
108
};
119

0 commit comments

Comments
 (0)