Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add cache fallback into DB library #494

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

PineappleIOnic
Copy link
Member

This PR introduces exception catches for when a DB cache fails and makes it so we automatically falls back to not using the cache, this PR currently uses Console::warning as a way to emit these failure mainly because getting rid of them entirely could result in performance degradation not being noticed because of caches being down.

Tests have been added to check these changes work and checks will also be added into Appwrite

Comment on lines 3976 to 3977
$this->purgeRelatedDocuments($collection, $id);
$this->purgeCachedDocument($collection->getId(), $id);
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 move this?

Copy link
Member Author

Choose a reason for hiding this comment

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

So if the cache fails it'll rollback the transaction

tests/e2e/Adapter/MariaDBTest.php Outdated Show resolved Hide resolved
tests/e2e/Adapter/Base.php Outdated Show resolved Hide resolved
Copy link
Member

@abnegate abnegate left a comment

Choose a reason for hiding this comment

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

We need to re-target to main and get the tests passing

@PineappleIOnic PineappleIOnic changed the base branch from 0.53.x to main January 23, 2025 06:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants