-
Notifications
You must be signed in to change notification settings - Fork 949
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
#2656 Fix for - Session is not provided by ClearChangeMasks when a change is notified #2772
#2656 Fix for - Session is not provided by ClearChangeMasks when a change is notified #2772
Conversation
…sks when a change is notified
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2772 +/- ##
==========================================
+ Coverage 54.62% 54.67% +0.05%
==========================================
Files 349 349
Lines 65697 65703 +6
Branches 13441 13443 +2
==========================================
+ Hits 35886 35923 +37
+ Misses 25917 25888 -29
+ Partials 3894 3892 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the Session information to the context passed to the QueueValue.
Hi team, I’ve noticed that the validation pipeline for my pull request failed due to code coverage requirements. While I understand the importance of comprehensive testing, I encountered a challenge because the existing library does not seem to provide a complete test set for the method I fixed. To ensure the quality and reliability of my contribution, I would appreciate any guidance or suggestions on how to proceed with creating the necessary unit tests. Alternatively, if there are existing tests that I might have overlooked, please point me in the right direction. Thank you for your understanding and support. Best regards Filippo |
Hi @Filippo-Oliva-ABB , no worries, the code coverage is flaky and not required to pass... the problem is that the devops pipeline was not triggered. Thats a known issue with first time PR. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great find!
@Filippo-Oliva-ABB unfortunately testing after the merge I ran into a NullArgumentException due to this change, MontoredItem.Session can be null. |
Hi @mregen, sorry for the exception thrown, I thought a MonitoredItem always had an associated Session. What are the cases where this doesn't happen? |
Please feel free to reopen a PR, we need to have another look how to fix the issue. |
Hi @mregen, I could reopen a PR to add a line before copying the ServerSystemContext with the Session inclusion that checks that the MonitoredNode.Session is not null and, if so, I could skip the enqueuing of the MonitoredItem. The MonitoredNode.Session property acquires a lock on an internal “lock object,” which does not prevent the Subscription.Session object from changing asynchronously. I could be wrong but, in other words, the MonitoredNode does not appear to be synchronized with the Subscription. My concern is that there may be a concurrency issue. The double-check on the Session that I propose in my new PR might mitigate this issue somewhat, but it may not fully resolve it. I hope this clarifies my concerns. Thank you for considering my input. Best regards Filippo |
Hi @Filippo-Oliva-ABB , it looks like this issue needs more investigation. its on the backlog. Thanks, Martin |
Proposed changes
It fixes this issue by including in the SystemContext (taken as an argument to the OnMonitoredNodeChanged method) the Server session related to the current MonitoredItem that is going to be passed to the QueueValue.
Related Issues
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.