Skip to content

[master378] Fix queued data delivery after durable subscription transfer - #4622

Merged
romanett merged 2 commits into
OPCFoundation:master378from
mrsuciu:master378-fix-durable-subscription-transfer
Oct 2, 2026
Merged

romanett merged 2 commits into
OPCFoundation:master378from
mrsuciu:master378-fix-durable-subscription-transfer

Conversation

@mrsuciu

@mrsuciu mrsuciu commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Force a fresh queue check after transfer so the first Publish returns saved data instead of an empty keep-alive. Reset the subscription’s expiration counter after transfer.

Add tests for queued data delivery, the timing bug, and an empty keep-alive after all queued values have been delivered.

Description

A durable subscription could return an empty keep-alive on the first Publish after transfer, even when values had accumulated while the client was disconnected. The server could reuse its previous keep-alive state before checking the queues.
This change forces a fresh queue check after transfer and resets the subscription's expiration counter.
Queued values are delivered first; normal keep-alives resume once the queues are drained.
Tests cover the timing bug, data delivery after reconnecting with SendInitialValues=false, and a keep-alive after draining all queued writes, including across multiple Publish responses.

Checklist

Put an x in the boxes that apply. You can complete these step by step after opening the PR.

  • I have signed the CLA and read the CONTRIBUTING doc.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added all necessary documentation.
  • I have verified that my changes do not introduce (new) build or analyzer warnings.
  • I ran all tests locally using the UA.slnx solution against at least .net framework and .net 10, and all passed.
  • I fixed all failing and flaky tests in the CI pipelines and all CodeQL warnings.
  • I have addressed all PR feedback received.

mrsuciu and others added 2 commits October 1, 2026 15:57
Force a fresh queue check after transfer so the first Publish returns
saved data instead of an empty keep-alive. Reset the subscription’s
expiration counter after transfer.

Add tests for queued data delivery, the timing bug, and an empty
keep-alive after all queued values have been delivered.
@marcschier marcschier added the 1.5.378 Only affects 1.5.378 (pre 2.0) label Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.08%. Comparing base (594eb7a) to head (b8da994).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           master378    #4622      +/-   ##
=============================================
+ Coverage      62.06%   62.08%   +0.01%     
=============================================
  Files            382      382              
  Lines          79514    79518       +4     
  Branches       13927    13927              
=============================================
+ Hits           49349    49366      +17     
+ Misses         25729    25726       -3     
+ Partials        4436     4426      -10     
Files with missing lines Coverage Δ
...braries/Opc.Ua.Server/Subscription/Subscription.cs 74.04% <100.00%> (+0.08%) ⬆️

... and 15 files with indirect coverage changes

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

@mrsuciu
mrsuciu marked this pull request as ready for review October 1, 2026 14:07
@mrsuciu
mrsuciu requested a review from romanett October 1, 2026 14:07
@mrsuciu mrsuciu changed the title Fix queued data delivery after durable subscription transfer [master378] Fix queued data delivery after durable subscription transfer Oct 1, 2026
@romanett romanett added the ready Ready to merge once CI Passes label Oct 2, 2026
@romanett
romanett merged commit 3b33053 into OPCFoundation:master378 Oct 2, 2026
72 checks passed
GoetzGoerisch pushed a commit to umati/connect that referenced this pull request Oct 5, 2026
…5.378.182 (#52)

This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [OPCFoundation.NetStandard.Opc.Ua](https://github.com/OPCFoundation/UA-.NETStandard) | `1.5.378.176` → `1.5.378.182` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/OPCFoundation.NetStandard.Opc.Ua/1.5.378.182?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/OPCFoundation.NetStandard.Opc.Ua/1.5.378.176/1.5.378.182?slim=true) |

---

### Release Notes

<details>
<summary>OPCFoundation/UA-.NETStandard (OPCFoundation.NetStandard.Opc.Ua)</summary>

### [`v1.5.378.182`](https://github.com/OPCFoundation/UA-.NETStandard/releases/tag/1.5.378.182): OPC UA 1.05 Maintenance Update

[Compare Source](OPCFoundation/UA-.NETStandard@1.5.378.176...1.5.378.182)

Maintenance Release for fixing bugs found on the main378 development branch.

#### Released packages

[OPCFoundation.NetStandard.Opc.Ua](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Core](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Core/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Security.Certificates](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Configuration](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Configuration/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Server](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Client](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Bindings.Https](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Bindings.Https/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.PubSub](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.PubSub/1.5.378.182)

#### What's Changed

- Remove unused fields from ReferenceNodeManager by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4472](OPCFoundation/UA-.NETStandard#4472)
- Master378 fix incomplete message buffering by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4550](OPCFoundation/UA-.NETStandard#4550)
- Fix ServerConfiguration URI values for CTT push-management checks by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4592](OPCFoundation/UA-.NETStandard#4592)
- Bound nested array preallocation, XML depth and inbound PubSub metadata by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4603](OPCFoundation/UA-.NETStandard#4603)
- Fix queued data delivery after durable subscription transfer by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4622](OPCFoundation/UA-.NETStandard#4622)
- Fix GDS client deadlock after a failed keep-alive by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4623](OPCFoundation/UA-.NETStandard#4623)
- merge Master378 to release by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4628](OPCFoundation/UA-.NETStandard#4628)

**Full Changelog**: <OPCFoundation/UA-.NETStandard@1.5.378.176...1.5.378.182>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzIuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://codeberg.org/umati/connect/pulls/52
Signed-off-by: umati-bot <git-bot@umati.org>
GoetzGoerisch pushed a commit to umati/connect that referenced this pull request Oct 5, 2026
…r to 1.5.378.182 (#53)

This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [OPCFoundation.NetStandard.Opc.Ua.Server](https://github.com/OPCFoundation/UA-.NETStandard) | `1.5.378.176` → `1.5.378.182` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.182?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.176/1.5.378.182?slim=true) |

---

### Release Notes

<details>
<summary>OPCFoundation/UA-.NETStandard (OPCFoundation.NetStandard.Opc.Ua.Server)</summary>

### [`v1.5.378.182`](https://github.com/OPCFoundation/UA-.NETStandard/releases/tag/1.5.378.182): OPC UA 1.05 Maintenance Update

[Compare Source](OPCFoundation/UA-.NETStandard@1.5.378.176...1.5.378.182)

Maintenance Release for fixing bugs found on the main378 development branch.

#### Released packages

[OPCFoundation.NetStandard.Opc.Ua](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Core](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Core/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Security.Certificates](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Configuration](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Configuration/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Server](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Client](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.Bindings.Https](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Bindings.Https/1.5.378.182)
[OPCFoundation.NetStandard.Opc.Ua.PubSub](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.PubSub/1.5.378.182)

#### What's Changed

- Remove unused fields from ReferenceNodeManager by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4472](OPCFoundation/UA-.NETStandard#4472)
- Master378 fix incomplete message buffering by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4550](OPCFoundation/UA-.NETStandard#4550)
- Fix ServerConfiguration URI values for CTT push-management checks by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4592](OPCFoundation/UA-.NETStandard#4592)
- Bound nested array preallocation, XML depth and inbound PubSub metadata by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4603](OPCFoundation/UA-.NETStandard#4603)
- Fix queued data delivery after durable subscription transfer by [@&#8203;mrsuciu](https://github.com/mrsuciu) in [#&#8203;4622](OPCFoundation/UA-.NETStandard#4622)
- Fix GDS client deadlock after a failed keep-alive by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4623](OPCFoundation/UA-.NETStandard#4623)
- merge Master378 to release by [@&#8203;romanett](https://github.com/romanett) in [#&#8203;4628](OPCFoundation/UA-.NETStandard#4628)

**Full Changelog**: <OPCFoundation/UA-.NETStandard@1.5.378.176...1.5.378.182>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzIuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://codeberg.org/umati/connect/pulls/53
Signed-off-by: umati-bot <git-bot@umati.org>
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) ready Ready to merge once CI Passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants