-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: main
Are you sure you want to change the base?
Conversation
src/Database/Database.php
Outdated
$this->purgeRelatedDocuments($collection, $id); | ||
$this->purgeCachedDocument($collection->getId(), $id); |
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 move this?
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.
So if the cache fails it'll rollback the transaction
# Conflicts: # composer.lock # tests/e2e/Adapter/Base.php
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.
We need to re-target to main and get the tests passing
# Conflicts: # src/Database/Database.php
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