Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-785

Remove start_request()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Major Change
    • Sprint:
      Python Sprint 12

      Description

      Remove MongoClient's methods start_request(), in_request(), and end_request().

      The purpose of requests was to provide read-your-writes consistency when using w=0 write concern. Starting a request pins a socket to a thread so any operations on that thread end up in the same queue on the server side. Justification for removing:

      • mongos 2.6+ doesn't support socket pinning by default, and mongos 2.8+ doesn't support it at all (SERVER-12273), so whatever weak consistency guarantees a request was supposed to provide are not provided with sharding.
      • It's unnecessary with MongoDB 2.6+ since write commands always block and send a response.
      • It's a confusing feature that should rarely be used, if ever, yet people incorrectly use it all the time.
      • It makes our connection pool unmaintainable to any but the most expert developers.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: