-
Notifications
You must be signed in to change notification settings - Fork 1k
Remove oldest channel if not used by session, when number of channels reaches MaxChannelCount - 1 #2986
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
Remove oldest channel if not used by session, when number of channels reaches MaxChannelCount - 1 #2986
Conversation
…reaches MaxChannelCount - 1
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2986 +/- ##
==========================================
- Coverage 55.46% 55.45% -0.01%
==========================================
Files 352 352
Lines 67853 67869 +16
Branches 13904 13908 +4
==========================================
+ Hits 37634 37637 +3
- Misses 26100 26106 +6
- Partials 4119 4126 +7 ☔ View full report in Codecov by Sentry. |
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.
looks good & passes ctt tests with 10 & 50 channels & 75 channles (for 75 increase channel & security Token lifetime)
Hello, @romanett Hmm...I couldn't get the latest Master (I checked commit history, the latest fixes were included indeed) of ReferenceConsoleServer to pass the UACTT Security test with session/channel 10/11, nor 50/51 nor 75/76. What were your settings? Were Server config and the UACTT project config syncs concerning the MaxSession and MaxChannel? |
|
@Siyuan-Xu-Wapice
|
|
Thanks for quick reply. I am confused now. When I just discovered the issue, I contacted Alexander Allmendinger (Test Lab Manager of OPC Foundation European Certification Lab) for help, his response regarding the test setup was that there should be one more MaxSecureChannel than MaxSession. PS. Yes, I can confirm with your suggested configurations the Ref Server would pass the test. |
… reaches MaxChannelCount - 1 (#2986) * Remove older channel if not used by session, when number of channels reaches MaxChannelCount - 1 * Corrected channelCount and renamings * Operate on snapshot * Snapshot the entire concurentdictionary


Proposed changes
Close the oldest unused channel prior to consuming the last available slot, thus always allowing one free channel slot to be available.
The pool of potential channels to pick from and chose the oldest is made by channels not used by sessions.
Related Issues
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply. You can also fill these out after creating the PR.Checklist
Put an
xin 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.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...