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: Subscription source bugs fix #1626

Merged

Conversation

kuznetsss
Copy link
Collaborator

@kuznetsss kuznetsss commented Sep 4, 2024

For #1620.

  • Add timeouts for websocket operations for connections to rippled. Without these timeouts if connection hangs for some reason, clio wouldn't know the connection is hanging.
  • Fix potential data race in choosing new subscription source which will forward messages to users.
  • Optimise switching between subscription sources.

Copy link
Collaborator

@cindyyan317 cindyyan317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I think the data race problem is solved.
Only want to double check the timeout value.

Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little style nit. And of course the crashing test needs to be fixed but frankly it's not possible to tell why it would fail just by looking at the code.. good luck 🤞 :rage4:

tests/unit/etl/LoadBalancerTests.cpp Show resolved Hide resolved
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.83%. Comparing base (2e2740d) to head (fbb55d6).
Report is 1 commits behind head on release/2.2.3.

Files with missing lines Patch % Lines
src/etl/impl/SubscriptionSource.cpp 87.50% 0 Missing and 2 partials ⚠️
src/etl/LoadBalancer.cpp 88.88% 1 Missing ⚠️
src/util/requests/impl/WsConnectionImpl.hpp 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release/2.2.3    #1626      +/-   ##
=================================================
+ Coverage          67.80%   67.83%   +0.03%     
=================================================
  Files                234      234              
  Lines               9451     9463      +12     
  Branches            5271     5277       +6     
=================================================
+ Hits                6408     6419      +11     
- Misses              1653     1654       +1     
  Partials            1390     1390              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kuznetsss kuznetsss merged commit 9fe9e7c into XRPLF:release/2.2.3 Sep 5, 2024
16 checks passed
kuznetsss added a commit to kuznetsss/clio that referenced this pull request Sep 6, 2024
For XRPLF#1620.

- Add timeouts for websocket operations for connections to rippled.
Without these timeouts if connection hangs for some reason, clio
wouldn't know the connection is hanging.
- Fix potential data race in choosing new subscription source which will
forward messages to users.
- Optimise switching between subscription sources.
kuznetsss added a commit that referenced this pull request Sep 6, 2024
Fixes #1620.
Cherry pick of #1626 into develop.

- Add timeouts for websocket operations for connections to rippled.
Without these timeouts if connection hangs for some reason, clio
wouldn't know the connection is hanging.
- Fix potential data race in choosing new subscription source which will
forward messages to users.
- Optimise switching between subscription sources.
kuznetsss added a commit that referenced this pull request Sep 25, 2024
Fixes #1620.
Cherry pick of #1626 into develop.

- Add timeouts for websocket operations for connections to rippled.
Without these timeouts if connection hangs for some reason, clio
wouldn't know the connection is hanging.
- Fix potential data race in choosing new subscription source which will
forward messages to users.
- Optimise switching between subscription sources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants