Skip to content

Feat isolation mode - #358

Merged
abnegate merged 48 commits into
mainfrom
feat-isolation-mode
Dec 8, 2023
Merged

Feat isolation mode#358
abnegate merged 48 commits into
mainfrom
feat-isolation-mode

Conversation

@abnegate

Copy link
Copy Markdown
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
Comment threadsrc/Database/Adapter/MariaDB.php Outdated
Comment threadsrc/Database/Adapter/MariaDB.php Outdated
Comment threadsrc/Database/Adapter/MariaDB.php Outdated
Comment threadsrc/Database/Database.php
Comment threadsrc/Database/Database.php
Comment threadsrc/Database/Adapter/MariaDB.php Outdated
Comment threadsrc/Database/Adapter/MariaDB.php Outdated
@christyjacob4

christyjacob4 commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

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.

Comment threadsrc/Database/Adapter/MariaDB.php
fanatic75
fanatic75 previously requested changes Nov 28, 2023
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
Comment threadsrc/Database/Adapter/MariaDB.php
@fanatic75
fanatic75 self-requested a review November 28, 2023 21:19
Comment threadsrc/Database/Database.php
Comment threadsrc/Database/Adapter/MariaDB.php
@abnegate

Copy link
Copy Markdown
MemberAuthor

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

ArchitectureInsert Time (s)Inserts per SecondQuery Time (s)
MariaDB1233.96405.200.0395
MariaDB - Shared1246.01401.280.0402
MySQL1479.15338.030.0436
MySQL - Shared1655.24302.070.0363

And the same for a fulltext index

ArchitectureInsert Time (s)Inserts per SecondQuery Time (s)
MariaDB1233.96405.2038.31
MariaDB - Shared1246.01401.2833.50
MySQL1479.15338.0315.29
MySQL - Shared1655.24302.0714.09

@abnegate
abnegate merged commit 035e6b4 into mainDec 8, 2023
@abnegate
abnegate deleted the feat-isolation-mode branch December 8, 2023 16:02
Sign up for freeto 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

@abnegate@christyjacob4@eldadfux@fogelito@fanatic75