Skip to content

Conversation

@eyalkoren
Copy link
Contributor

@eyalkoren eyalkoren commented Dec 8, 2021

Implementing #2092 for Vert.x 3

Switching to the dedicated span concurrent map helped to discover a small transaction leak (not causing memory leak because GC still cleans) due to a change in internal API.

@ghost
Copy link

ghost commented Dec 8, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-08T08:31:58.536+0000

  • Duration: 70 min 2 sec

  • Commit: d77ba43

Test stats 🧪

Test Results
Failed 0
Passed 2627
Skipped 21
Total 2648

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run compatibility tests : Run the JDK Compatibility test.

  • run integration tests : Run the APM-ITs.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@AlexanderWert AlexanderWert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Minor question about unit test for context clean-up

@Override
public ElementMatcher<? super MethodDescription> getMethodMatcher() {
return named("doEnd").and(takesNoArguments());
return named("doEnd").or(named("onEnd")).and(takesNoArguments());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we miss this initially? onEnd is available in 3.9 but not in 3.6.
How did you notice this?
Maybe we need a unit test for making sure context gets cleaned up properly, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what this map migration does- it triggers our existing global recycling test assertions, thus uncovering such cases.
What we had before is a map that holds references to spans without counting these references, so the Vert.x API could change, causing spans to remain in the map and still get recycled. Now that we count these map references, if you don't properly remove them from the map, the recycling assertion causes the v3-latest tests to fail, which is how I found that.

@eyalkoren eyalkoren merged commit d7751ba into elastic:master Dec 8, 2021
@eyalkoren eyalkoren deleted the switch-to-SpanConcurrentHashMap-Vertx3 branch December 8, 2021 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants