Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-807

Remove secondary-ok commands whitelist

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      With the new Server Selection Spec, there is no longer a list of "secondary-ok" commands, and commands not in that list, when executed with a non-"primary" read preference, are no longer silently routed to the primary. On the other hand, the read preference configured on the client, database, or collection object no longer applies to commands executed with a generic command helper:

      https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands

      https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#general-command-method-going-to-primary

      Delete gSecondaryOkCommands:

      https://github.com/mongodb/mongo-c-driver/blob/0aa9addfd7fb572b93e0723d6c32370721a18d05/src/mongoc/mongoc-cursor.c#L159

      ... and review the functions mongoc_client_command, etc., for compliance with the spec.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: