Mongo transactions#625
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…ngo-transactions # Conflicts: # src/Database/Adapter/Mongo.php
| // If the database is not a replica set, we can't use transactions | ||
| if(!$this->client->isReplicaSet()){ | ||
| return true; | ||
| } |
There was a problem hiding this comment.
In this scenario we should still run the callback and return it's result
| } | ||
|
|
||
| // Session is now closed by the client using endSessions, state is reseted | ||
| // TODO do we want session per transaction or to manage it on the connection level? |
There was a problem hiding this comment.
Session per txn is fine 👍 in fact we will need it that way since Appwrite pools use a different connection for each DB call
| /** | ||
| * TODO Do we even need this find? | ||
| * We can just return the result from the insertDocument. | ||
| */ |
There was a problem hiding this comment.
We can just return from insert if that works
…ngo-transactions # Conflicts: # composer.json # composer.lock # src/Database/Adapter/Mongo.php
…nd MongoDB configuration adjustments
…ngo-transactions # Conflicts: # composer.json # composer.lock # src/Database/Adapter/MariaDB.php
…ion handling in Mongo adapter. Updated command for MongoDB to support replica sets and improved transaction callback handling in the adapter.
…ngo-transactions # Conflicts: # src/Database/Adapter/Mongo.php
…e MongoDB replica set and user creation.
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
No description provided.