-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: DB Proxy Adapter #338
Conversation
use Utopia\Database\Exception; | ||
|
||
class Conflict extends Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure we check if there's anywhere we need to update the order of catch blocks because of this change (if any sub-types are caught, those catches need to now come before the DatabaseException
catch)
tests/Database/Base.php
Outdated
@@ -5088,7 +5088,7 @@ public function testOneToOneTwoWayRelationship(): void | |||
], | |||
]); | |||
|
|||
static::getDatabase()->createDocument('country', $doc); | |||
static::getDatabase()->createDocument('country', new Document($doc->getArrayCopy())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DB proxy is dedicated HTTP server that maintains all database collections.
Using this proxy instead of separating maximum connection limit between containers allows improvements to scalability. It also prevents many idling connections when they could be used better by another containers.