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

Fix duplication of recoverable list changes after unrecoverable changes #7155

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

tgoyne
Copy link
Member

@tgoyne tgoyne commented Nov 20, 2023

After we copy a list in client reset recovery we need to not apply any changes to that list in subsequent transactions as we copy directly to the final state of the list and applying changes would just duplicate those changes.

This is only applicable to flexible sync when there's a subscription change in between the write with unrecoverable changes and the write with recoverable changes.

@tgoyne tgoyne self-assigned this Nov 20, 2023
@tgoyne tgoyne force-pushed the tg/flx-client-reset-list-duplicate branch from fc10087 to 4f7ff92 Compare November 20, 2023 21:26
Copy link

coveralls-official bot commented Nov 20, 2023

Pull Request Test Coverage Report for Build github_pull_request_285434

  • 77 of 77 (100.0%) changed or added relevant lines in 3 files are covered.
  • 68 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+0.008%) to 91.697%

Files with Coverage Reduction New Missed Lines %
src/realm/util/compression.cpp 1 91.59%
test/test_index_string.cpp 1 94.13%
src/realm/object-store/shared_realm.cpp 2 93.74%
src/realm/sync/network/websocket.cpp 2 74.23%
src/realm/util/file.cpp 2 82.05%
test/test_lang_bind_helper.cpp 2 93.3%
src/realm/sync/network/network.cpp 3 89.86%
src/realm/sync/noinst/client_reset.cpp 4 93.5%
src/realm/sync/noinst/client_reset_operation.cpp 4 90.32%
src/realm/sync/transform.cpp 4 63.08%
Totals Coverage Status
Change from base Build 1854: 0.008%
Covered Lines: 231370
Relevant Lines: 252321

💛 - Coveralls

@tgoyne tgoyne requested a review from ironage November 20, 2023 22:37
Copy link
Contributor

@ironage ironage left a comment

Choose a reason for hiding this comment

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

Good catch 👍
Copying lists was implemented before FLX recovery where multiple transactions were possible, and this was missed.

CHANGELOG.md Outdated Show resolved Hide resolved
After we copy a list in client reset recovery we need to not apply any changes
to that list in subsequent transactions as we copy directly to the final state
of the list and applying changes would just duplicate those changes.

This is only applicable to flexible sync when there's a subscription change in
between the write with unrecoverable changes and the write with recoverable
changes.
@tgoyne tgoyne force-pushed the tg/flx-client-reset-list-duplicate branch from 4f7ff92 to 9f24e26 Compare November 22, 2023 04:02
@tgoyne tgoyne merged commit bc31f07 into master Nov 22, 2023
2 checks passed
@tgoyne tgoyne deleted the tg/flx-client-reset-list-duplicate branch November 22, 2023 16:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants