Skip to content
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

Merged
merged 44 commits into from
Mar 1, 2024
Merged

Feat: DB Proxy Adapter #338

merged 44 commits into from
Mar 1, 2024

Conversation

Meldiron
Copy link
Contributor

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.

@Meldiron Meldiron marked this pull request as ready for review October 16, 2023 13:23
composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
src/Database/Adapter/Proxy.php Outdated Show resolved Hide resolved
src/Database/Adapter/Proxy.php Outdated Show resolved Hide resolved
src/Database/Adapter/ProxyMariaDB.php Outdated Show resolved Hide resolved
src/Database/Exception.php Outdated Show resolved Hide resolved
Comment on lines +5 to +7
use Utopia\Database\Exception;

class Conflict extends Exception
Copy link
Member

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)

@@ -5088,7 +5088,7 @@ public function testOneToOneTwoWayRelationship(): void
],
]);

static::getDatabase()->createDocument('country', $doc);
static::getDatabase()->createDocument('country', new Document($doc->getArrayCopy()));
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2024-02-29 at 15 08 02@2x

because test is failing without it. Maybe now that its fully stateless, some problem came up

@Meldiron Meldiron changed the base branch from main to feat-framework-v2 February 22, 2024 13:42
@Meldiron Meldiron changed the base branch from feat-framework-v2 to main February 22, 2024 13:44
phpunit.xml Outdated Show resolved Hide resolved
src/Database/Query.php Outdated Show resolved Hide resolved
@eldadfux eldadfux merged commit 02000f0 into main Mar 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants