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: Improve message sender / handler robustness in resync scenarios (#13733) (CP: 23.0) #13805

Merged
merged 1 commit into from
May 20, 2022

Conversation

vaadin-bot
Copy link
Collaborator

No description provided.

…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
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented May 19, 2022

Unit Test Results

   951 files     951 suites   47m 45s ⏱️
6 214 tests 6 165 ✔️ 49 💤 0
6 435 runs  6 380 ✔️ 55 💤 0

Results for commit 5344ba9.

♻️ This comment has been updated with latest results.

@mshabarov mshabarov merged commit 92a70ad into 23.0 May 20, 2022
@mshabarov mshabarov deleted the cherry-pick-13733-to-23.0-1652942056450 branch May 20, 2022 06:15
@vaadin-bot
Copy link
Collaborator Author

This ticket/PR has been released with Vaadin 23.0.11.

mshabarov pushed a commit that referenced this pull request Jun 10, 2022
…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]>
taefi pushed a commit that referenced this pull request Jun 10, 2022
…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]>
@vaadin-bot
Copy link
Collaborator Author

This ticket/PR has been released with Vaadin 14.8.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants