Skip to content
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

refactor: Harden Realm transactions behind BackgroundExecutor #1105

Closed
wants to merge 17 commits into from

Conversation

adrien-coye
Copy link
Contributor

@adrien-coye adrien-coye commented Jan 26, 2024

Abstract

When we do a realm transaction, we want to make sure the system will not interrupt us while doing so.

While doing it I also brought back some abstractions we have on the Mail side to prepare an abstraction core side.

I also took the liberty to apply our new standard of making explicit if a realm object is frozen or not.

fix: Using a BackgroundExecutor should prevent the OS from killing the app mid transaction
@adrien-coye adrien-coye requested a review from a team as a code owner January 26, 2024 14:59
@adrien-coye adrien-coye marked this pull request as draft January 26, 2024 14:59
@adrien-coye adrien-coye changed the title refactor: Harden Realm transaction behind BackgroundExecutor refactor: Harden Realm transactions behind BackgroundExecutor Jan 26, 2024
Copy link
Contributor Author

@adrien-coye adrien-coye left a comment

Choose a reason for hiding this comment

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

First auto review

@adrien-coye adrien-coye self-assigned this Feb 2, 2024
@adrien-coye
Copy link
Contributor Author

@PhilippeWeidmann I had the time to do what we discussed. I can split this PR if it will make the review easier / faster.
A lot of changes are actually simply moved/split code that Git fails to match.

@adrien-coye
Copy link
Contributor Author

The TODO: Move to core will be dealt with later as it needs the breaking core 7.0.0 that will come later.

Copy link

sonarqubecloud bot commented Feb 7, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

13 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@adrien-coye adrien-coye added this to the 4.4.2 milestone Feb 9, 2024
@adrien-coye adrien-coye modified the milestones: 4.4.2, on_hold Feb 26, 2024
@valentinperignon valentinperignon removed the request for review from a team March 1, 2024 10:44
@adrien-coye
Copy link
Contributor Author

adrien-coye commented Mar 19, 2024

Superseded by APIV3. Will redo more realm safety later.

Sign up for free to 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.

1 participant