We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 057dec4 commit 3906137Copy full SHA for 3906137
src/Database/Adapter/Mongo.php
@@ -125,6 +125,12 @@ public function withTransaction(callable $callback): mixed
125
126
public function startTransaction(): bool
127
{
128
+
129
+ // If the database is not a replica set, we can't use transactions
130
+ if (!$this->client->isReplicaSet()) {
131
+ return false;
132
+ }
133
134
try {
135
if ($this->inTransaction === 0) {
136
if (!$this->sessionId) {
0 commit comments