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

Raise an error if an opened MongoClient is used after a fork

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      We already attempt to raise a warning if the application uses the same MongoClient before and after a fork. With session pooling this behavior becomes even more undefined (PYTHON-1660) because the parent and child may end up using the same server session at the same time. We should consider if we want completely restrict this usage by raising an error instead of a warning.

      Such a change would be backwards breaking for apps that are written incorrectly however I think a hard error might be better than undefined behavior.

            Unassigned Unassigned
            shane.harvey@mongodb.com Shane Harvey
            0 Vote for this issue
            1 Start watching this issue