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

mongobridge's rejectConnectionsFrom command doesn't handle pending requests

    • Fully Compatible
    • ALL
    • Hide
      python buildscripts/resmoke.py --executor=replica_sets jstests/replsets/no_chaining.js --storageEngine=mmapv1 --repeat=10
      python buildscripts/resmoke.py --executor=replica_sets jstests/replsets/no_chaining.js --storageEngine=mmapv1 --repeat=10
    • QuInt C (11/23/15)
    • 0

      The kHangUp state is checked only when a request is received on the source connection by the bridge. A request with the await data flag set would block until the destination has something to reply with. During that time, if the bridge has been reconfigured to close connections from the host of the source connection, then it shouldn't forward the response. Proposal is to check for the kHangUp state after receiving a response on the dest connection and close the source connection.

      The following sequence of events would trigger spurious failures in no_chaining.js:

      1. Node 2 sends a getMore request to node 0.
      2. The bridge corresponding to node 0 is configured to close connections when it receives a request from node 2.
      3. The client performs the insert.
      4. Node 0 sends a response to node 2's getMore request.
      5. The bridge corresponding to node 0 forwards the response to node 2. (Node 2 is now synced.)
      6. Node 2 sends another getMore request to node 0.
      7. The bridge corresponding to node 0 closes the connection to node 2.

            max.hirschhorn@mongodb.com Max Hirschhorn
            max.hirschhorn@mongodb.com Max Hirschhorn
            0 Vote for this issue
            3 Start watching this issue