-
Notifications
You must be signed in to change notification settings - Fork 753
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
[1.2.x] Fix concurrent issue in observability #42962
Merged
keizer619
merged 5 commits into
ballerina-platform:ballerina-1.2.x
from
NipunaMadhushan:fix-observability-1.2.x
Jun 26, 2024
Merged
[1.2.x] Fix concurrent issue in observability #42962
keizer619
merged 5 commits into
ballerina-platform:ballerina-1.2.x
from
NipunaMadhushan:fix-observability-1.2.x
Jun 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NipunaMadhushan
changed the title
Fix concurrent issue in observability
[1.2.x] Fix concurrent issue in observability
Jun 20, 2024
...b/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java
Outdated
Show resolved
Hide resolved
...b/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java
Outdated
Show resolved
Hide resolved
Can we add test cases for these cases? |
Since these scenarios came only with high throughput in MG, I really doubt if it is possible as a Java test case. |
warunalakshitha
approved these changes
Jun 26, 2024
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.
LGTM
chiranSachintha
approved these changes
Jun 26, 2024
keizer619
approved these changes
Jun 26, 2024
keizer619
merged commit Jun 26, 2024
046c47a
into
ballerina-platform:ballerina-1.2.x
7 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Due to high throughput of inprogress requests, we have been notified that the
http_inprogress_requests_value
metric value is higher than the expected value.There is a observer context list (HashMap) which contains the observer contexts with span IDs as keys. since it is updated with multiple threads concurrently, it resulted in incorrect calculations of new array sizes, including negative sizes for the HashMap.
Therefore HashMap has been replaced with ConcurrentHashMap which is a thread-safe implementation. With this approach, multiple threads can access it simultaneously without any synchronization issues.
Fixes https://github.com/wso2-enterprise/internal-support-ballerina/issues/679
Approach
Samples
Remarks
Check List