Bug Report
| Q |
A |
| BC Break |
no |
| Version |
^2.0 |
Summary
Commit from code side passes as if commit was successful when no data was written into the database. Issue reveals itself when Doctrine is being used with Percona multi-master cluster with galera plugin.
Commits silently fail. You end up with "lost data" as rest of the code executes as if everything went fine.
Establish Percona database cluster with galera plugin. Run multiple queries which would use Pessimistic lock to different nodes at the same time. Durining the quorum the requested will be rejected. However, the transanction from code side will pass as if commit was successful despite of it.
To fix: Doctrine\DBAL\Connection::commit() consistently returns false when commit didn't happen. However, this information is tightly wrapped and inaccessible from the Doctrine's API.
Best in my opinion: thow exception on Doctrine\ORM\Connection::commit() when it calls Doctrine\DBAL\Connection::commit() and it returns false. This will uphold the consistency instead of dealing with bool values.
To have exception being thrown after failure to commit in this instance.
Bug Report
Summary
Commit from code side passes as if commit was successful when no data was written into the database. Issue reveals itself when Doctrine is being used with Percona multi-master cluster with galera plugin.
Commits silently fail. You end up with "lost data" as rest of the code executes as if everything went fine.
Establish Percona database cluster with galera plugin. Run multiple queries which would use Pessimistic lock to different nodes at the same time. Durining the quorum the requested will be rejected. However, the transanction from code side will pass as if commit was successful despite of it.
To fix: Doctrine\DBAL\Connection::commit() consistently returns false when commit didn't happen. However, this information is tightly wrapped and inaccessible from the Doctrine's API.
Best in my opinion: thow exception on Doctrine\ORM\Connection::commit() when it calls Doctrine\DBAL\Connection::commit() and it returns false. This will uphold the consistency instead of dealing with bool values.
To have exception being thrown after failure to commit in this instance.