-
Notifications
You must be signed in to change notification settings - Fork 164
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 #7668
Conversation
* 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
…alues are not supported in 2.1
854f1a1
to
d77f498
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 8 of 12 files at r1, 4 of 4 files at r3.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)
flow-server/src/main/java/com/vaadin/flow/internal/StateTree.java, line 437 at r3 (raw file):
public void prepareForResync()
Is this impl the same as in the original PR ?
I would move this logic into the Root node as a whole method and avoid exposing fireDetachListeners
and fireAttachListeners
…achListeners and StateNode::fireDetachListeners
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.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)
flow-server/src/main/java/com/vaadin/flow/internal/StateTree.java, line 437 at r3 (raw file):
Previously, denis-anisimov (Denis) wrote…
public void prepareForResync()
Is this impl the same as in the original PR ?
I would move this logic into the Root node as a whole method and avoid exposing
fireDetachListeners
andfireAttachListeners
Done.
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 5 of 5 files at r4.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java, line 395 at r4 (raw file):
public void prepareForResync() {
Sorry , I meant RootNode
but it's inside StateTree
and it doesn't help....
I would may be do this method protected
,
keep the same method in the StateTree
which delegates to RootNode::prepareForResync
.
But may be it's not worth .......
Up to you .
…ee::prepareForResync
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.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java, line 395 at r4 (raw file):
Previously, denis-anisimov (Denis) wrote…
public void prepareForResync() {
Sorry , I meant
RootNode
but it's insideStateTree
and it doesn't help....
I would may be do this methodprotected
,
keep the same method in theStateTree
which delegates toRootNode::prepareForResync
.
But may be it's not worth .......
Up to you .
Yes, that is better. Fixed.
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 5 files at r5.
Reviewable status: complete! all discussions resolved, 1 of 1 LGTMs obtained
Adapted by removing the rejection of stale promises (2.1 does not support
@ClientCallable
return values).This change is