-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Retryability
-
None
Currently, all batching, retry, server and connection selection, single-operation execution, and error handling logic are part of the giant 500-line Operation.Execute function. That function is becoming unmaintainable as more and more logic is added to it (e.g. RTT short-circuit, memory buffer reuse, additional error handling, etc). Difficulty maintaining Operation.Execute has also contributed to several bugs (GODRIVER-2677, GODRIVER-2768) and Go driver version retractions (v1.11.0 - v1.11.2).
Refactor Operation.Execute into functions and/or types with separate concerns. For example, it might make sense to create a function and/or type for each of:
- Batching
- Retry
- Single-operation execution
Definition of done:
- Split Operation.Execute into functions and/or types that separate at least batching, retry, and single-operation execution concerns.
- Add tests that assert the behavior of each concern individually.
- is related to
-
GODRIVER-2579 Incorporate connection pool checkout into server selection loop
- Backlog
-
GODRIVER-2892 Remove all code that is only required for MongoDB 3.4 and earlier
- Closed