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

Added a limit to the Channels on the server side and removed "stale" channels #2540

Merged
merged 39 commits into from
Apr 22, 2024

Conversation

mrsuciu
Copy link
Contributor

@mrsuciu mrsuciu commented Feb 28, 2024

Proposed changes

Added a limit to the number of Channels on the server side and removed "stale" channels.
Add option to console client to leak channels and run forever.

Related Issues

  • Fixes #

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@mrsuciu mrsuciu requested a review from mregen February 28, 2024 12:46
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 73.61111% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 54.58%. Comparing base (884ddf3) to head (8a2e9d6).

Files Patch % Lines
...tack/Opc.Ua.Core/Stack/Tcp/TcpTransportListener.cs 68.29% 9 Missing and 4 partials ⚠️
Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs 42.10% 7 Missing and 4 partials ⚠️
Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs 50.00% 5 Missing and 1 partial ⚠️
...k/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs 28.57% 2 Missing and 3 partials ⚠️
Libraries/Opc.Ua.Server/Server/StandardServer.cs 71.42% 0 Missing and 2 partials ⚠️
...c.Ua.Core/Stack/Tcp/UaSCBinaryChannel.Symmetric.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2540      +/-   ##
==========================================
- Coverage   54.70%   54.58%   -0.13%     
==========================================
  Files         342      342              
  Lines       65041    65082      +41     
  Branches    13331    13350      +19     
==========================================
- Hits        35581    35522      -59     
- Misses      25612    25682      +70     
- Partials     3848     3878      +30     

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

@mregen
Copy link
Contributor

mregen commented Feb 29, 2024

some tests are failing, is all yet updated for the new state?

Copy link
Contributor

@mregen mregen left a comment

Choose a reason for hiding this comment

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

This change is not quite ready. The cleanup timer should only close inactive or opening channels.
A channel enters inactive state if an active session is closed.
Once inactive, the timer checks inactivity and closes it.

@EthanChangAED
Copy link

@mregen, please review the updates.

@mregen mregen added this to the March Update milestone Mar 25, 2024
@mregen
Copy link
Contributor

mregen commented Mar 26, 2024

@mregen, please review the updates.

testing this next...

@mregen mregen modified the milestones: March Update, April Update Apr 15, 2024
Copy link
Contributor

@mregen mregen left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@mregen mregen left a comment

Choose a reason for hiding this comment

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

please check my comment on AcceptSocket, it should be closed right away?

@mregen
Copy link
Contributor

mregen commented Apr 22, 2024

tested and looks all good to me.. :shipit:

@mregen mregen merged commit d1a9baa into OPCFoundation:master Apr 22, 2024
72 of 73 checks passed
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.

Server allows unlimited number of channels and doesn't remove stale channels
5 participants