-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add forced sync when switching to realtime mode #134
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
==========================================
- Coverage 43.31% 43.16% -0.15%
==========================================
Files 104 104
Lines 22972 23051 +79
==========================================
Hits 9951 9951
- Misses 13021 13100 +79 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Sources/Core/Client.swift
Outdated
// NOTE(chacha912): When re-establishing real-time sync, there might have been | ||
// changes while the connection was off. Therefore, syncing needs to be performed | ||
// once. Currently, if syncing is called here, it overlaps with `syncInternal`, | ||
// causing the issue of the response being applied twice. (Ref: issues#603) | ||
// Therefore, we set `remoteChangeEventReceived` to true, allowing syncing to | ||
// occur in `syncInternal`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment has updated.
yorkie-team/yorkie-js-sdk#713
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chacha912 I changed the comment. Thanks.
What this PR does / why we need it:
Previously, when using
resume
, remote changes made during thepause
were not being applied. After resuming, if there have been any local or remote changes, a sync is triggered, and previous changes are applied.This PR addresses this issue by triggering a sync during
resume
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist: