Stresstest fix - Add limits to the graph mutation stress test#244
Merged
Stresstest fix - Add limits to the graph mutation stress test#244
Conversation
Contributor
Contributor
|
🔧 Report generated by pr-comment-scanbuild |
jbachorik
reviewed
Jul 9, 2025
| public void link(GraphNode node) { | ||
| nodes.add(node); | ||
| // Simple round-robin replacement - no expensive size checks or polling | ||
| int index = (linkIndex++) % MAX_LINKS; |
Collaborator
There was a problem hiding this comment.
The increment operator is not atomic, unfortunately.
You can use AtomicInteger for the linkIndex instead.
jbachorik
reviewed
Jul 9, 2025
Comment on lines
24
to
26
| // Optional: method to access links if needed for verification | ||
| public GraphNode getLink(int index) { | ||
| return links.get(index % MAX_LINKS); |
Collaborator
There was a problem hiding this comment.
Is this used/going to be used soon?
80a2a60 to
9762603
Compare
Contributor
Author
|
Thanks for the feedback, |
9762603 to
c58e008
Compare
jbachorik
approved these changes
Jul 10, 2025
Collaborator
jbachorik
left a comment
There was a problem hiding this comment.
Looks reasonable.
Just in case - did you check that the stresstest counters are somewhat comparable before and after this change?
Contributor
Author
|
This leads to comparable results |
This file contains hidden or 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
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.
What does this PR do?:
Add limits to the number of nodes and links.
Motivation:
Ensure we don't go in OOM error in the stresstest.
Additional Notes:
How to test the change?:
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!