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

Enable Durable Subscriptions #2978

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

romanett
Copy link
Contributor

Proposed changes

  • [Server] Durable Subscriptions ([Server] Durable Subscriptions #2683)
    With this change the server library allows user to provide own durable Notification & Event Queues to make the server support durable subscriptions.

As an example the reference Server provides custom queues and enables durable subscriptions with a limited lifetime using in memory queues.

Types of changes

  • 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

  • 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

* [Server] Durable Subscriptions (OPCFoundation#2683)

* Implement a system test for DurableSubscriptions (OPCFoundation#2839)
* Client Side
Co-authored-by: ALTERNATE-DEV\Archie <[email protected]>
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 85.13761% with 81 lines in your changes missing coverage. Please review.

Project coverage is 56.53%. Comparing base (cf82847) to head (00af40f).

Files with missing lines Patch % Lines
...Server/Subscription/MonitoredItem/MonitoredItem.cs 78.04% 14 Missing and 4 partials ⚠️
.../Opc.Ua.Server/NodeManager/SamplingGroupManager.cs 6.66% 14 Missing ⚠️
.../Opc.Ua.Server/Subscription/SubscriptionManager.cs 65.71% 4 Missing and 8 partials ⚠️
...braries/Opc.Ua.Server/Subscription/Subscription.cs 76.47% 4 Missing and 4 partials ⚠️
...nitoredItem/QueueHandler/DataChangeQueueHandler.cs 94.62% 1 Missing and 4 partials ⚠️
Libraries/Opc.Ua.Client/Session/SessionAsync.cs 20.00% 4 Missing ⚠️
...braries/Opc.Ua.Client/Subscription/Subscription.cs 90.00% 3 Missing and 1 partial ⚠️
...onitoredItem/Queue/DataChangeMonitoredItemQueue.cs 95.06% 2 Missing and 2 partials ⚠️
...ion/MonitoredItem/Queue/EventMonitoredItemQueue.cs 90.90% 1 Missing and 2 partials ⚠️
...ies/Opc.Ua.Server/Diagnostics/CustomNodeManager.cs 90.47% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2978      +/-   ##
==========================================
+ Coverage   55.50%   56.53%   +1.02%     
==========================================
  Files         352      356       +4     
  Lines       67851    68050     +199     
  Branches    13904    13936      +32     
==========================================
+ Hits        37664    38469     +805     
+ Misses      26072    25425     -647     
- Partials     4115     4156      +41     

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

{
if (discardOldest)
{
m_events.RemoveRange(0, m_events.Count - (int)queueSize);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a LinkedList will handle removal from beginning and the end with the same complexity ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this case comes not often enough to make this worthwile, benchmarking woudl be necessary:
https://stackoverflow.com/questions/5983059/why-is-a-linkedlist-generally-slower-than-a-list

Copy link
Contributor

@mrsuciu mrsuciu left a comment

Choose a reason for hiding this comment

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

See comments

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.

2 participants