-
Notifications
You must be signed in to change notification settings - Fork 168
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: Improve message sender / handler robustness in resync scenarios #13733
Conversation
flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java
Outdated
Show resolved
Hide resolved
flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java
Outdated
Show resolved
Hide resolved
flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java
Outdated
Show resolved
Hide resolved
@TatuLund could you have a look at the changes I made in #13727 as well? I think a variant of that might still be useful. |
…ageHandler.java Co-authored-by: Artur <[email protected]>
@pepijnve Yes, I had overlooked that part. |
@TatuLund for my own local testing I've adapted my earlier PR in https://github.com/datadobi/flow/tree/fix13726 |
flow-client/src/main/java/com/vaadin/client/communication/RequestResponseTracker.java
Show resolved
Hide resolved
How did you test this patch? Could we use the approach suggested here #13726 (comment) to make an IT test? |
@mshabarov there's a further patch to See 46ebd66 |
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.
Thanks @pepijnve , I'll have a look how we can combine these two solutions.
I've rebased https://github.com/datadobi/flow/tree/fix13726 on this PR branch for you. It's one followup commit to Tatu's earlier work. The essence of this commit is that in |
@pepijnve thanks a lot for rebasing your changes. I've applied your patch to the current branch, it looks good. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…13733) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve
…13733) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve
…13733) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve
…13733) (#13806) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve Co-authored-by: Tatu Lund <[email protected]> Co-authored-by: Artur <[email protected]>
…13733) (#13804) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve Co-authored-by: Tatu Lund <[email protected]> Co-authored-by: Artur <[email protected]>
…13733) (#13805) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve Co-authored-by: Tatu Lund <[email protected]> Co-authored-by: Artur <[email protected]>
…13733) (#13805) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve Co-authored-by: Tatu Lund <[email protected]> Co-authored-by: Artur <[email protected]>
…13733) (#13805) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve Co-authored-by: Tatu Lund <[email protected]> Co-authored-by: Artur <[email protected]>
…13733) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve
…13733) Process re-sync messages via normal message queue and use semaphore to protect re-sync process (i.e. do not allow other messages while performing re-sync). This PR is adopted from similar fixes for Vaadin 8. vaadin/framework#11791 vaadin/framework#12043 vaadin/framework#12178 This also changes the method `forceMessageHandling` in a way that the desire to resynchronise is registered before calling `endRequest`. If this is not done, `endRequest` may end up sending out a request itself and that then causes the re-sync request to fail because a request is already in flight. This ends up throwing an IllegalStateException at com/vaadin/client/communication/RequestResponseTracker.java. Fixes #13726 Co-authored-by: Artur <[email protected]> Co-authored-by: Pepijn Van Eeckhoudt @pepijnve
Process resync messages via normal message queue and use semaphor to protect resync process (i.e. do not allow other messages while performing resync)
This PR is adopted from similar fixes for Vaadin 8
vaadin/framework#11791
vaadin/framework#12043
vaadin/framework#12178
This is alternative and possibly more comprehensive fix than
#13727
Fixes #13726