Skip to content

[To dev/1.3] Pipe: Rewrote the OPC UA subscription logic to avoid the bug of third-party subscription model - #17524

Merged
jt2594838 merged 2 commits into
dev/1.3from
opc-fix
Apr 21, 2026
Merged

[To dev/1.3] Pipe: Rewrote the OPC UA subscription logic to avoid the bug of third-party subscription model#17524
jt2594838 merged 2 commits into
dev/1.3from
opc-fix

Conversation

@Caideyipi

@CaideyipiCaideyipi commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Now the original subscriptionModel has some problems:

  1. The subscription logic for node is async, timely pull, and won't pull the inital value directly. This may cause plenty time, if a node's update frequency is low, the latency may be large to pull the first value.
  2. In subscription model, one sample failure will cause permanent halt to the whole task.
  3. And may be other problems.
    Thus, this PR rewrote the subscription logic, and changed the subscription value on push (with some performance optimization) to avoid "badWaitingForInitialData" after long term running.

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecovBot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.31148% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.57%. Comparing base (413b074) to head (b0b689c).
⚠️ Report is 4 commits behind head on dev/1.3.

Files with missing linesPatch %Lines
...ipe/sink/protocol/opcua/server/OpcUaNameSpace.java7.69%48 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## dev/1.3 #17524 +/- ##
=============================================
- Coverage 41.58% 41.57% -0.02% 
Complexity 227 227 =============================================
Files 3597 3597 Lines 236918 236968 +50 Branches 28673 28678 +5 =============================================
- Hits 98514 98511 -3 - Misses 138404 138457 +53 

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

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

@jt2594838
jt2594838 merged commit ecef8f7 into dev/1.3Apr 21, 2026
18 of 20 checks passed
Sign up for freeto 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

@Caideyipi@jt2594838