Commit 0a57ca6
authored
Improvements for connection desynchronization and hardening of error handling with connections (#1998)
Close desynchronized connections and harden response handling
Detect responseTo mismatches before processing response bodies so session
state is not advanced from an unrelated reply, and close the connection to
prevent desynchronized streams from returning to the pool.
Ensure read and post-read failures close connections only when appropriate,
release buffers before closing, preserve fatal Error propagation, and keep
command monitoring to one started event and one terminal event across sync
and async paths.
Add unit coverage for responseTo mismatch handling, reusable exception paths,
buffer release ordering, and sync/async error handling. Document related
JUnit test conventions.
JAVA-62101 parent 0276f63 commit 0a57ca6
4 files changed
Lines changed: 2059 additions & 48 deletions
File tree
- .agents/references
- driver-core/src
- main/com/mongodb/internal/connection
- test/unit/com/mongodb/internal/connection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| |||
0 commit comments