-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(jvm): support logout and login when using in-memory storage #2274
fix(jvm): support logout and login when using in-memory storage #2274
Conversation
Updated the logic and structure for handling file-related operations in storageData. Added Support for both file-backed and in-memory databases in the userDatabaseBuilder. Also introduced the InMemoryDatabaseCache to hold a database across logins/ logouts without losing the data.
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed Test Services
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2274 +/- ##
=============================================
- Coverage 58.08% 58.08% -0.01%
Complexity 21 21
=============================================
Files 1086 1087 +1
Lines 41144 41147 +3
Branches 3808 3808
=============================================
+ Hits 23898 23899 +1
- Misses 15618 15619 +1
- Partials 1628 1629 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
* fix(jvm): support logout and login when using in-memory storage Updated the logic and structure for handling file-related operations in storageData. Added Support for both file-backed and in-memory databases in the userDatabaseBuilder. Also introduced the InMemoryDatabaseCache to hold a database across logins/ logouts without losing the data. * style: unify inMemoryDatabase cleaning * style: remove duplicate blank line * chore: fix missing constructor call
PR Submission Checklist for internal contributors
The PR Title
The PR Description
What's new in this PR?
Issues
When using
inMemoryStorage
for JVM, it's impossible to logout and then login again, as a new instance will be created from scratch, even when usingSELF_SOFT_LOGOUT
LogoutReason.Solutions
Introduced the
InMemoryDatabaseCache
to hold a database across logins/logouts without losing the data.If
nuke
is called, this cache will be cleared too. Which should only happen when there's a hard logout.Make sure we also clear the cache when running unit tests.
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.