reset primary read replica connections when reseting registry#2155
reset primary read replica connections when reseting registry#2155sad270 wants to merge 1 commit intodoctrine:3.1.xfrom
Conversation
|
Closing the connection is better than forcing to connect to the replica. If the next request starts with something that needs to use the primary, it will avoid connecting for nothing (same if the next request does not use the DB at all btw). |
|
As discussed in the issue, this requires being careful with the case of messenger consumers using the doctrine transport. The transport will not like a connection getting closed between message as the transport has a longer lifecycle. |
|
There is a Maybe in the configuration we should add a "close_on_reset" configuration (or something like). If it is |
fix: #2154