[JAVA-5125] Some write concern errors are not retried according to spec Created: 30/Aug/23 Updated: 10/Jan/24 |
|
| Status: | Backlog |
| Project: | Java Driver |
| Component/s: | Retryability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Quarter: | FY24Q3 | ||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
|
While attempting to debug these test failures, the following observations were made: 1. Clusters starting with 5.0 include a RetryableWriteError error label, which is likely what's causing the driver to take a different code path and succeed on newer server releases This looks like a bug. The reason that the tests pass in the other variants is due to the specific error code used in the test: 91. Because of this, ProtocolHelper#createSpecialException returns a MongoNodeIsRecoveringException} which is then thrown. But with error code 6, {{ProtocolHelper#createSpecialException returns null, no exception is thrown, and the retry logic doesn't execute. So the fact that 4.2 and 4.4 sharded clusters, for some reason, are incorrectly returning error code 6 instead of 91 due to the failpoint, the bug is exposed. The retryable writes spec clearly intends that error code 6 in a write concern error should cause a RetryableWriteError to be added, yet it is not. It's simple to demonstrate this by just changing the 91 to 6 in the tests, and they will fail in all configurations. The plan for |
| Comments |
| Comment by Githook User [ 31/Aug/23 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Remove incorrect test-skipping logic (#1186) Skip newly-running but failing tests in code
|