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 isolation mode #358

Merged
merged 48 commits into from
Dec 8, 2023
Merged

Feat isolation mode #358

merged 48 commits into from
Dec 8, 2023

Conversation

abnegate
Copy link
Member

Allow setting different isolation modes by using different setters

Schema per project:

$database
    ->setDatabase($projectId)
    ->create();

Single schema, unique tables (current arch):

$database
    ->setDatabase('appwrite')
    ->setNamespace($projectId)
    ->create();

Single schema, shared tables:

$database
    ->setDatabase('appwrite')
    ->setShareTables(true)
    ->setTenant($projectId)
    ->create();

@abnegate abnegate marked this pull request as ready for review November 22, 2023 08:25
@christyjacob4
Copy link
Contributor

christyjacob4 commented Nov 28, 2023

Let's setup a test bench to simulate the kind of loads we receive on cloud.

I am mainly concerned about indexes and how they perform before and after this change.

src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Outdated Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
src/Database/Adapter/MariaDB.php Show resolved Hide resolved
@fanatic75 fanatic75 self-requested a review November 28, 2023 21:19
@abnegate
Copy link
Member Author

abnegate commented Dec 8, 2023

@christyjacob4 @fogelito For 500K documents, the columns are indexed, and then an equal query is run.

Architecture Insert Time (s) Inserts per Second Query Time (s)
MariaDB 1233.96 405.20 0.0395
MariaDB - Shared 1246.01 401.28 0.0402
MySQL 1479.15 338.03 0.0436
MySQL - Shared 1655.24 302.07 0.0363

And the same for a fulltext index

Architecture Insert Time (s) Inserts per Second Query Time (s)
MariaDB 1233.96 405.20 38.31
MariaDB - Shared 1246.01 401.28 33.50
MySQL 1479.15 338.03 15.29
MySQL - Shared 1655.24 302.07 14.09

@abnegate abnegate merged commit 035e6b4 into main Dec 8, 2023
9 checks passed
@abnegate abnegate deleted the feat-isolation-mode branch December 8, 2023 16:02
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.

5 participants