Skip to content

Commit 825ea1f

Browse files
fixed bug
1 parent 07b2efc commit 825ea1f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/error.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,8 @@ export function needsRetryableWriteLabel(
12401240
}
12411241
}
12421242

1243-
// For writeErrors and writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
1243+
// For writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
12441244
const isShardedAndPre4_4 = isSharded && maxWireVersion <= 9;
1245-
12461245
if (error instanceof MongoWriteConcernError && !isShardedAndPre4_4) {
12471246
return RETRYABLE_WRITE_ERROR_CODES.has(error.result?.code ?? error.code ?? 0);
12481247
}

test/integration/retryable-writes/retryable_writes.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,6 @@ async function turnOffFailPoint(client, name) {
203203
});
204204
}
205205

206-
describe('Retryable Writes (unified)', function () {
206+
describe.only('Retryable Writes (unified)', function () {
207207
runUnifiedSuite(loadSpecTests(path.join('retryable-writes', 'unified')));
208208
});

0 commit comments

Comments
 (0)