Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed Jul 2, 2024
1 parent 07b2efc commit 825ea1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,8 @@ export function needsRetryableWriteLabel(
}
}

// For writeErrors and writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
// For writeConcernErrors from a pre-4.4 mongos response, do not use the code to determine retryability.
const isShardedAndPre4_4 = isSharded && maxWireVersion <= 9;

if (error instanceof MongoWriteConcernError && !isShardedAndPre4_4) {
return RETRYABLE_WRITE_ERROR_CODES.has(error.result?.code ?? error.code ?? 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,6 @@ async function turnOffFailPoint(client, name) {
});
}

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

0 comments on commit 825ea1f

Please sign in to comment.