[JAVA-4034] Refactor read/write retries to accommodate for both PoolClearedError and CSOT Created: 05/Mar/21 Updated: 28/Oct/23 Resolved: 27/Sep/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Backlog - Core Eng Program Management Team | Assignee: | Valentin Kavalenka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | Avoiding connection storms | ||||||||||||
| Quarter: | FY22Q4 | ||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||
| Description |
|
DRIVERS Ticket Description
Script Target - If you can read this text, the script has failed
|
| Comments |
| Comment by Githook User [ 25/Jul/22 ] | ||||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Do not retry a read operation when in a transaction (#982) Fixes a regression introduced in 4.4.0 in scope of
| ||||||||||
| Comment by Githook User [ 25/Jul/22 ] | ||||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Do not retry a read operation when in a transaction (#982) Fixes a regression introduced in 4.4.0 in scope of
| ||||||||||
| Comment by Githook User [ 27/Sep/21 ] | ||||||||||
|
Author: {'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}Message: Changes in this commit do the following two major things: 1) These changes make selecting a server (`binding.get*ConnectionSource`) 2) The retry limit (not more than two attempts) was hardcoded in the driver's code structure, Changes in this commit represent the outcome of refactoring the code related to the retry logic. With the changes in this commit, applying the client-side timeout (CSOT) to a retryable operation
| ||||||||||
| Comment by Cloud GitHub Webhooks [ 27/Sep/21 ] | ||||||||||
|
stIncMale merged a pull request (JAVA-4034 Refactor read write retries to accommodate for both `PoolClearedError` and CSOT) into the following branch: | ||||||||||
| Comment by Valentin Kavalenka [ 04/May/21 ] | ||||||||||
|
Currently the retry logic is hardcoded to have at most two attempts (one retry) and is located in the execution order of a command at points after selecting a server and checking out a connection for the first attempt. MongoConnectionPoolClearedException may happen when checking out a connection for the first attempt, therefore we must move the retry logic earlier in the execution order: before checking out a connection for the first attempt, but after selecting a server for the first attempt, as all specifications either explicitly indicate that errors while selecting the server for the first attempt are not retryable, or say nothing about this:
Following are the retryable operations and the relevant specifications:
Consider DRIVERS-1570 and DRIVERS-1815 when doing the changes. |