Skip to content

fix(server): enforce browse continuation point limit at capacity (#4036) - #4270

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

fix(server): enforce browse continuation point limit at capacity (#4036)#4270
marcschier merged 1 commit into
master378from
romanett-backport-1eb5e0c7

Conversation

@romanett

Copy link
Copy Markdown
Contributor

Backports the browse continuation point limit fix from master (commit 1eb5e0c, PR #4036) to master378.

Problem

An off-by-one error in browse continuation-point retention allowed one extra browse continuation point to remain active. The eviction check only removed the oldest point when the count exceeded MaxBrowseContinuationPoints, so a session could hold MaxBrowseContinuationPoints + 1 points.

Fix

In Session.SaveContinuationPoint, evict the oldest point as soon as the session reaches the configured limit (>= instead of >), so at most MaxBrowseContinuationPoints points remain active.

Tests

Adds SessionContinuationPointsTests.SaveContinuationPointEvictsOldestWhenCountReachesConfiguredLimit, a regression test that saves one more than the configured limit and asserts the oldest point is evicted while exactly the configured number are retained. Verified it fails against the pre-fix code and passes with the fix.

Note: The upstream commit modified the refactored SessionContinuationPoints class, which does not exist on master378. The equivalent change here is applied to Session.SaveContinuationPoint, and the regression test is written against the master378 Session/ISession API.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

@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.19%. Comparing base (db256c6) to head (bdc745b).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           master378    #4270      +/-   ##
=============================================
- Coverage      60.19%   60.19%   -0.01%     
=============================================
  Files            378      378              
  Lines          79067    79067              
  Branches       13838    13838              
=============================================
- Hits           47598    47594       -4     
- Misses         27047    27049       +2     
- Partials        4422     4424       +2     
Files with missing lines Coverage Δ
Libraries/Opc.Ua.Server/Session/Session.cs 60.47% <100.00%> (+0.19%) ⬆️

... and 9 files with indirect coverage changes

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

Backport of 1eb5e0c from master. Fixes an off-by-one error in browse continuation-point retention by evicting the oldest point as soon as the session reaches MaxBrowseContinuationPoints, and adds a regression test covering the exact-limit case that previously allowed one extra browse continuation point to remain active.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@marcschier
marcschier merged commit adfe814 into master378 Aug 18, 2026
93 checks passed
@marcschier
marcschier deleted the romanett-backport-1eb5e0c7 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