Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2632

Test readPreference for runCommand on Direct Connection to Secondary

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: CRUD
    • Needed

      Summary

      Extend the runCommand unified spec tests (or prose tests) to check the case where a user makes a direct connection to a secondary node in a replica set. In this case, we would expect a read preference to exist but as a primaryPreferred.

      Motivation

      The Go Driver explicitly defaults the read preference for non-standalone and non-single nodes to "Primary". This behavior is probably not necessary, but we should still ensure that, in the case where a user creates a direct connection to a secondary node, the default behavior is that read preference is explicitly set to "PrimaryPreferred"

      Who is the affected end user?

      Go Driver

      How does this affect the end user?

      NA

      How likely is it that this problem or use case will occur?

      Main path

      If the problem does occur, what are the consequences and how severe are they?

      NA

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      No

      Is this ticket only for tests?

      Yes

      Acceptance Criteria

      A new unified spec test that tests the case mentioned in the Summary section.

            Assignee:
            Unassigned Unassigned
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: