| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
💚 CLA has been signed |
Sorry, something went wrong.
🤖 GitHub commentsJust comment with:
|
Sorry, something went wrong.
|
thanks for the review 👍 the failed build was due to incompatibility of that sub cancel with java 7. I reworked that using Instrumentation -SubscriptionCancelInstrumentation that will call the discardIf on cancelled subscription |
Sorry, something went wrong.
|
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
|
Sorry, something went wrong.
| } | ||
|
|
||
| @Override | ||
| public ElementMatcher<? super TypeDescription> getTypeMatcher() { |
There was a problem hiding this comment.
Is there a common name to all the implementations we need to instrument here ? the hasSuperType is very expensive without getTypeMatcherPreFilter, so if possible adding getTypeMatcherPreFilter would be relevant here.
Sorry, something went wrong.
There was a problem hiding this comment.
only I can think of is something like this, but that probably will not narrow it much, right?
@Override
public ElementMatcher<? super NamedElement> getTypeMatcherPreFilter() {
return nameContains("Subscription").or(nameContains("Subscriber"));
}or maybe have multiple these instrumentations by package/library that implements the CoreSubscriber ? or have just one for the implementations from reactor.core and the rest will be cleaned potentially by the GC later?
Sorry, something went wrong.
There was a problem hiding this comment.
I think this should be fine as a first step, do you have a list of all the classes that are being currently instrumented here to verify all of them match ? If those are spring classes I would expect them to stay consistently named. If those are user-provided then it might be too narrow and we need another approach.
Sorry, something went wrong.
There was a problem hiding this comment.
the problem is, that there can come any implementation of CoreSubscriber. if we miss some thanks to this filter, the TracedSubscriber will not remove it immediately from its contextMap / subscriptionMap.
if I understand it correctly, the memory leak caused by this was always handled by GC. in this newer spring 7 came newer reactor or other library that allowed us to spot it more easily? that was at least my thought...
I had here another solution to solve it - the wrapper around that subscription (ecde26e) , but I had there compile issue with the older java versions. so maybe just try to solve that to avoid using this instrumentation?
Sorry, something went wrong.
| @@ -0,0 +1,6 @@ | |||
| # set to DEBUG for easier test application debugging | |||
| logging.level.root=DEBUG | |||
There was a problem hiding this comment.
we probably don't need to have DEBUG by default here, this will make the test execution very verbose.
Sorry, something went wrong.
There was a problem hiding this comment.
it seems like it is just copy from the existing "testapp" module. so should I remove it also from there?
Sorry, something went wrong.
There was a problem hiding this comment.
yes, please do that.
Sorry, something went wrong.
|
run docs-build |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What does this PR do?
Since the original PR is stuck for some time,
I created another one with the same commits + a bit better solution for the core of this issue.
Also when I was running these newer tests I found one more issue:
Spring7ServerFunctionalInstrumentationTest#dispatchError test was failing due to TracedSubscriber not removing the reference of the subscription on cancel() from contextMap. so the solution might be the CancellationAwareSubscription that is just the wrapper calling the discardIf() after cancel.
Is it possible that the issue was there even with older versions of reactor (from older Spring version), but now in that Spring 7 ( reactor 3.8.6 ) it was always failing.
Checklist