[GODRIVER-2432] Improve panic handling in background processes Created: 20/May/22 Updated: 05/Dec/23 Resolved: 16/Nov/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.0, 1.14.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Matt Dale | Assignee: | Preston Vasquez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Epic Link: | Go Driver 2.0: Driver | ||||||||||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||||||
| Description |
|
There is a mixture of defer recover blocks without a clear purpose and possibly unhandled panics in background goroutines in the Go driver (e.g. There are currently 3 "defer recover" blocks in the Go Driver that do not have a clear purpose or comment and discard the caught error. That means there are possibly panics happening in the Go Driver that are caught and ignored, increasing the risk of undiscovered driver bugs or unexpected behavior. Defer recover blocks and associated Github/Gerrithub history:
All of that context doesn't provide any answers about why those defer recover blocks were added. The surrounding code has been changed significantly so they may no longer be necessary. A recent draft PR with the defer recover blocks removed passes all tests, but it's still possible the called code could panic due to some untested condition. We should collect more information about why the defer recover blocks were added, then remove them if possible. Definition of done:
|