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

Sync: avoid deleting root event of CurrentState on gappy sync #5137

Merged
merged 7 commits into from
Feb 3, 2022

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Feb 2, 2022

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

Unit Test Results

  76 files  ±0    76 suites  ±0   53s ⏱️ +4s
143 tests ±0  143 ✔️ ±0  0 💤 ±0  0 ±0 
448 runs  ±0  448 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit fd306e1. ± Comparison against base commit f187216.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed="21" failures="3" errors="0" skipped="2"
  • [org.matrix.android.sdk.account]
    passed="5" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.internal]
    passed="158" failures="1" errors="0" skipped="38"
  • [org.matrix.android.sdk.ordering]
    passed="16" failures="0" errors="0" skipped="0"
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed="2" failures="0" errors="0" skipped="0"


private fun migrateTo22(realm: DynamicRealm) {
Timber.d("Step 21 -> 22")
val hasMissingStateEvent = realm.where("CurrentStateEventEntity").isNull(CurrentStateEventEntityFields.ROOT.`$`).findFirst() != null
Copy link
Member

Choose a reason for hiding this comment

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

I you left some room, wouldn't this lead to null root and trigger an unwanted initial sync?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we have updated the query together. Thanks!

…e joined rooms (ignore LEFT room)

Should reduce the number of initial sync
Co-authors: ganfra and billcarsonfr
@bmarty bmarty merged commit e5874e4 into main Feb 3, 2022
@bmarty bmarty deleted the hotfix/1.3.18 branch February 3, 2022 14:52
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.

3 participants