reta commented on code in PR #3521:
URL: https://github.com/apache/cxf/pull/3521#discussion_r4180000994
##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java:
##########
Review Comment:
> I said that because if there is something to log in cos , it means that
something has already been written on the OutputStream of the http Socket (so
those bytes could have reached in some way the client before it resets the
connection...).
Thanks @vp340 , the difficulty here is that., as per your observation, is:
- the failed write will not trigger close
- the cleaner will try close dangling stream backed by files (so inmem
stream will never be cleaned)
- consequently, letting the logger callback to be executed by close call
from cleaner 1) would be delayed 2) would be confusing (no response actually
was delivered, we just tried to sent something, but we have no idea if anything
was ever delivered)
> If U don't want to log, that solution should work. But I think it doesn't
solve the memory leak in the queue : the callback still stays attach holding
the reference to Message and other attributes.
This is good point, I will double check that, intuitive once we remove
reference to the cached stream, it should be available for garbage collection
(along with the Message, etc)
> If I have time in the next days I will try to implement my idea that I
said before... if that's okay with U :) .
Surely, please go ahead, this is very tricky , thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]