Skip to content

Commit

Permalink
TASK: Add mention of MasterSlaveConnection for old dbal versions
Browse files Browse the repository at this point in the history
  • Loading branch information
albe authored Jan 4, 2021
1 parent 0d0c328 commit c37c7ae
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,9 @@ that connection wrapper by setting the following options in your packages ``Sett
user: 'user' # adjust to your database user
password: 'pass' # adjust to your database password
.. note::
In doctrine/dbal versions lower then 2.11 the wrapper class was named `MasterSlaveConnection`, so you need to adjust to that if you are such a version.

With this setup, Doctrine will use one of the replica connections picked once per request randomly
for all queries until the first writing query (e.g. insert or update) is executed. From that point
on the primary server will be used solely. This is to solve the problems of replication lag and
Expand Down

0 comments on commit c37c7ae

Please sign in to comment.