The RetryType is currently used to determine if the driver.Operation needs to do retryable reads or retryable writes. Instead of adding an additional field that would specify if the operation is a read or a write, convert RetryType into Type and convert RetryWrites and RetryReads into Write and Read.
As follow-on work for GODRIVER-1042, also update the createReadPref method to use the Type information to determine if it should return a read preference at all, e.g. the case where we have a direct connection and are not connected to a mongos, wherein we will send a read preference of primary preferred.
- split from
-
GODRIVER-1042 Don't add read preference for non-mongos server with OP_QUERY
- Closed