Commit 23a6243
committed
PYTHON-1660 Clear MongoClient session pool after a fork
Note that a MongoClient instance is still not fork-safe. This change
avoids "Cannot start transaction X on session <SID> because a newer
transaction Y has already started" errors and other incorrect command
results caused by duplicate sessions in the child process.1 parent 94cb6ac commit 23a6243
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
834 | 835 | | |
835 | 836 | | |
836 | 837 | | |
837 | | - | |
| 838 | + | |
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
869 | 871 | | |
870 | 872 | | |
871 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
872 | 882 | | |
873 | 883 | | |
874 | 884 | | |
| |||
889 | 899 | | |
890 | 900 | | |
891 | 901 | | |
892 | | - | |
| 902 | + | |
893 | 903 | | |
894 | 904 | | |
895 | 905 | | |
896 | 906 | | |
897 | 907 | | |
898 | 908 | | |
899 | 909 | | |
900 | | - | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
901 | 913 | | |
902 | 914 | | |
903 | 915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
0 commit comments