[JAVA-4551] RejectedExecutionException happens in driver Created: 28/Mar/22 Updated: 28/Oct/23 Resolved: 01/Apr/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Error Handling |
| Affects Version/s: | 4.5.1 |
| Fix Version/s: | 4.6.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Francisco Alejandro Lozano López | Assignee: | Valentin Kavalenka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | external-user | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Documentation Changes: | Not Needed |
| Description |
|
During my integration tests, I setup a 3-node replica-set in docker, and connect to it with Java client. Often I get this exception in the logs:
Sometimes this exception manages to fail my test raising to the main junit thread. other times it stays in the background thread that launched the task. It's really weird. Versions:
|
| Comments |
| Comment by Githook User [ 01/Apr/22 ] |
|
Author: {'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}Message: Tolerate `DefaultConnectionPool.ready`/`invalidate` being called after or concurrently with `close` (#906)
|
| Comment by Githook User [ 01/Apr/22 ] |
|
Author: {'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}Message: Tolerate `DefaultConnectionPool.ready`/`invalidate` being called after or concurrently with `close` (#906)
|
| Comment by Francisco Alejandro Lozano López [ 01/Apr/22 ] |
|
thanks a lot! |
| Comment by Valentin Kavalenka [ 31/Mar/22 ] |
|
Thank you for reporting the problem. The stacktrace you provided happens in a thread different from the thread running your tests, but there is indeed a code path that allows observing RejectedExecutionException in a user thread: this happens when DefaultConnectionPool is closed concurrently with an exception thrown while the driver executes a user-requested operation. Even though we don't have the stacktrace of an exception that effects your test thread, the PR linked with this ticket should deal with all situations. |