Skip to content

Treat zero MaxNotificationsPerPublish as unlimited (OPC 10000-4) - #4263

Merged
marcschier merged 1 commit into
master378from
romanett-backport-a5dd6ea
Aug 18, 2026
Merged

Treat zero MaxNotificationsPerPublish as unlimited (OPC 10000-4)#4263
marcschier merged 1 commit into
master378from
romanett-backport-a5dd6ea

Conversation

@romanett

Copy link
Copy Markdown
Contributor

Proposed changes

Backport commit a5dd6ea (#4047) to master378.

OPC UA defines zero as no notification limit. The message builder compared the queued count directly with zero, so an effective zero limit emitted no event or data-change notifications and left the queues pending. Separately, the revision logic treated a configured Server maximum of zero as a numeric cap, revising a non-zero Client request to zero and silently removing the Client's requested limit.

Fix

  • Treat an effective zero limit as unlimited while draining event and data-change queues.
  • When the Client requests zero, use the Server's configured maximum, which may itself remain zero/unlimited.
  • When the Server maximum is zero, preserve a non-zero Client request, including uint.MaxValue.
  • When the Server maximum is finite, cap zero, uint.MaxValue, and larger finite Client requests to that maximum.
  • Cover the same revision matrix through both CreateSubscription and ModifySubscription.

Related Issues

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.

@romanett romanett added the 1.5.378 Only affects 1.5.378 (pre 2.0) label Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.26%. Comparing base (db256c6) to head (298ef09).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           master378    #4263      +/-   ##
=============================================
+ Coverage      60.19%   60.26%   +0.06%     
=============================================
  Files            378      378              
  Lines          79067    79072       +5     
  Branches       13838    13840       +2     
=============================================
+ Hits           47598    47652      +54     
+ Misses         27047    27003      -44     
+ Partials        4422     4417       -5     
Files with missing lines Coverage Δ
...braries/Opc.Ua.Server/Subscription/Subscription.cs 73.96% <100.00%> (+1.02%) ⬆️
.../Opc.Ua.Server/Subscription/SubscriptionManager.cs 76.79% <100.00%> (+0.45%) ⬆️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@marcschier
marcschier merged commit 4ea1e25 into master378 Aug 18, 2026
111 of 112 checks passed
@marcschier
marcschier deleted the romanett-backport-a5dd6ea branch August 18, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.378 Only affects 1.5.378 (pre 2.0)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants