-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Task]: Invalid Tenant Cache should not bring the instance down - [Stability] #33504
Comments
Not required now as the change is reverted. |
Re-opening as we may implement this again by handling GAC permissions. |
Hi @NilanshBansal , I would like to see what went wrong during deserialization / serialization and would also like to fix the root cause. I am part of the community discord server, if you want to connect there. I can look at this if no one else is. |
This task is implemented and completed in this commit d11d404. |
## Description The tenant is fetched multiple times across the appsmith codebase but is rarely updated (from the admin settings). Every time a fetch call to the database is costly both in terms of resources and time taken. The consolidated api also makes a call to fetch the tenant and return to the client. To improve the performance of fetching the tenant information, we are moving the tenant information to redis cache for quicker fetch. This will improve the performance of the consolidated api and also reduce the time taken by all the different functionalities within the backend codebase which depend on tenant to process further. > The old PR implementation #33309 had to be reverted due to the tenant GAC permissions not in sync between database and redis. RCA [ref](https://www.notion.so/appsmith/Reversion-for-Tenant-Caching-implementation-after-merging-to-release-cd720b9959e4413f98decb884c375ad2). This PR uses the same branch as the old PR and builds the pending functionalities to complete the implementation. **Counterpart EE PR**: appsmithorg/appsmith-ee#4275 **TL;DR** Adds tenant information `tenantService.getDefaultTenant()` to redis. Fixes #33083, #33504, #33578 ## Automation /ok-to-test tags="@tag.Settings" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9253953003> > Commit: 7b4bf8d > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9253953003&attempt=1" target="_blank">Click here!</a> <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
SubTasks
The instance is heavily dependent on the tenants response in the consolidated API to work.
Recently we saw an occurrence when the release was down because of a serialization error in the tenant cache. https://theappsmith.slack.com/archives/CGBPVEJ5C/p1715747695304469
The system should be fault-tolerant and be able to auto-heal in such scenarios. If the redis cache is invalid or if serializing from redis has an issue, the code should default to querying the database and return response.
The text was updated successfully, but these errors were encountered: