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

Attempt to avoid ghost sessions in NodeUI #4053

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

mdomasevicius
Copy link
Contributor

@mdomasevicius mdomasevicius commented Oct 6, 2021

We have been getting some bug reports that SSE state push contains long-running sessions with 0 traffic. It is possible that Session Created and Removed could be fired almost the same time but due to SubscribeAsync will arrive in reverse order permanently adding a session to pushed SSE state which in turn will display a ghost session in NodeUI that is not sending/receiving traffic.

Signed-off-by: Mantas Domaševičius mantas@mysterium.network

@codecov-commenter
Copy link

Codecov Report

Merging #4053 (a023ae9) into master (f14e43c) will decrease coverage by 0.13%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4053      +/-   ##
==========================================
- Coverage   43.29%   43.16%   -0.14%     
==========================================
  Files         331      331              
  Lines       17625    17625              
==========================================
- Hits         7630     7607      -23     
- Misses       9235     9247      +12     
- Partials      760      771      +11     
Impacted Files Coverage Δ
core/state/state.go 70.60% <0.00%> (ø)
nat/traversal/pinger.go 74.80% <0.00%> (-5.82%) ⬇️
core/policy/oracle.go 86.48% <0.00%> (-5.41%) ⬇️
tequilapi/endpoints/sse_handler.go 69.11% <0.00%> (-3.68%) ⬇️
p2p/channel.go 72.98% <0.00%> (-0.71%) ⬇️
requests/dialer_swarm.go 77.09% <0.00%> (+2.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f14e43c...a023ae9. Read the comment docs.

We have been getting some bug reports that SSE state that we push contain long-running sessions with 0 traffic. It is possible that Session `Created` and `Removed` could be fired almost the same time but due to `SubscribeAsync` will arrive in reverse order that permanently adding a session to pushed SSE state which in turn will display a ghost session in NodeUI that is not sending/receiving traffic.

Signed-off-by: Mantas Domaševičius <mantas@mysterium.network>
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.

None yet

4 participants