Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34557

Allow running transactions against primaries with readPreferences other than 'primary'

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-rc0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.6
    • Sprint:
      Repl 2018-05-07
    • Linked BF Score:
      0

      Description

      We want to restrict transactions to only run on primaries. The way SERVER-33580 accomplished that was by restricting them to only work if the readPreference provided was 'primary'. Drivers, however, may send 'primaryPreferred' when connected to a primary via a direct connection.

      We should undo the server changes from SERVER-33580, and instead change the checkCanServeReadsFor method in ReplicationCoordinator to return false if the node is not currently primary and we're in a transaction.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              william.schultz William Schultz (Inactive)
              Reporter:
              spencer Spencer Brody (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: