-
Notifications
You must be signed in to change notification settings - Fork 161
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
Implement resynchronization of the client and server #7631
Conversation
818f3e6
to
36f5584
Compare
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.
Reviewed 3 of 7 files at r1, 8 of 8 files at r2.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
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.
@Legioth highlighted another potential issue with @ClientCallable
promises left hanging on the client-side after the resynchronization. Added a commit to reject them during resynchronization and an IT.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale (waiting on @caalador)
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.
Reviewed 4 of 4 files at r3.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
* Mark server-side state tree unattached and send all changes, clear client-side state tree and rebuild DOM * Reject any pending promises from @ClientCallable invocations during client resynchronization
* Mark server-side state tree unattached and send all changes, clear client-side state tree and rebuild DOM * Reject any pending promises from @ClientCallable invocations during client resynchronization
When the server receives the resync request, run detach listeners and mark all state tree nodes as not attached. Handle the changes rebuilding the state tree from the root on the client.
Fixes #7590.
This change is