You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "the-thing (via GitHub)" <gi...@apache.org> on 2026/09/24 07:06:16 UTC
[PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
the-thing opened a new pull request, #67:
URL: https://github.com/apache/mina/pull/67
https://github.com/apache/mina/actions/runs/35831174047/job/107083881501
`org.apache.mina.filter.logging.MdcInjectionFilterTest#testOnlyRemoteAddress` sometimes fails due to additional log event sneaking in without remote address:
https://github.com/apache/mina/blob/0813a77e5e1206000dffa647e7b384c88fd5b900/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java#L702
There are already some comments about logging in this file causing problems with `MdcInjectionFilterTest`
https://github.com/apache/mina/blob/0813a77e5e1206000dffa647e7b384c88fd5b900/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java#L684
The disposing sessions log is quite new.
**Changes**
- filter log events `org.apache.mina.filter.logging.MdcInjectionFilterTest#testOnlyRemoteAddress` coming from `IoProcessor` logger
The test still processes and verifies `org.apache.mina.core.filterchain.IoFilter` events such as:
```
Firing a SESSION_CREATED event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_CREATED event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
sessionCreated / org.apache.mina.filter.logging.MdcInjectionFilterTest
sessionCreated / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event SESSION_CREATED has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event SESSION_CREATED has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_OPENED event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_OPENED event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
DummyIoFilter.sessionOpened / org.apache.mina.filter.logging.MdcInjectionFilterTest
DummyIoFilter.sessionOpened / org.apache.mina.filter.logging.MdcInjectionFilterTest
sessionOpened / org.apache.mina.filter.logging.MdcInjectionFilterTest
sessionOpened / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event SESSION_OPENED has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event SESSION_OPENED has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_RECEIVED event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_RECEIVED event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Processing a MESSAGE_RECEIVED for session 1 / org.apache.mina.filter.codec.ProtocolCodecFilter
Processing a MESSAGE_RECEIVED for session 3 / org.apache.mina.filter.codec.ProtocolCodecFilter
decode / org.apache.mina.filter.logging.MdcInjectionFilterTest
decode / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageReceived-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageReceived-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageReceived-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageReceived-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
encode / org.apache.mina.filter.logging.MdcInjectionFilterTest
encode / org.apache.mina.filter.logging.MdcInjectionFilterTest
Firing a WRITE event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a WRITE event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event WRITE has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
encode / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event WRITE has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a WRITE event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
encode / org.apache.mina.filter.logging.MdcInjectionFilterTest
Firing a WRITE event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event WRITE has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event WRITE has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a EXCEPTION_CAUGHT event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a EXCEPTION_CAUGHT event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
exceptionCaught / org.apache.mina.filter.logging.MdcInjectionFilterTest
exceptionCaught / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event EXCEPTION_CAUGHT has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event EXCEPTION_CAUGHT has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event MESSAGE_RECEIVED has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event MESSAGE_RECEIVED has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_SENT event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_SENT event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
messageSent-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event MESSAGE_SENT has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event MESSAGE_SENT has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_SENT event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a MESSAGE_SENT event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
messageSent-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-1 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
messageSent-2 / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event MESSAGE_SENT has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event MESSAGE_SENT has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_IDLE event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_IDLE event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
sessionIdle / org.apache.mina.filter.logging.MdcInjectionFilterTest
sessionIdle / org.apache.mina.filter.logging.MdcInjectionFilterTest
Firing a CLOSE event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a CLOSE event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event CLOSE has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event CLOSE has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event SESSION_IDLE has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
Event SESSION_IDLE has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_CLOSED event for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Firing a SESSION_CLOSED event for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
sessionClosed / org.apache.mina.filter.logging.MdcInjectionFilterTest
sessionClosed / org.apache.mina.filter.logging.MdcInjectionFilterTest
Event SESSION_CLOSED has been fired for session 3 / org.apache.mina.core.filterchain.IoFilterEvent
Event SESSION_CLOSED has been fired for session 1 / org.apache.mina.core.filterchain.IoFilterEvent
```
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "the-thing (via GitHub)" <gi...@apache.org>.
the-thing commented on PR #67:
URL: https://github.com/apache/mina/pull/67#issuecomment-5809453496
Wrong branch... :(
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "elecharny (via GitHub)" <gi...@apache.org>.
elecharny commented on PR #67:
URL: https://github.com/apache/mina/pull/67#issuecomment-5810375128
Wait, the idea is probably to have a discussion about whether we maintain those branches or not.
Mina 2.0.X branch was started in 2008
Mina 2.1.X branch was started in 2019
At some point, it's pretty sure they have many issues that aren't fixed.
I have spent a hell lot of time late spring fixing CVEs and backporting them to those branches, and I'm not sure it's really a good move, as it stuck the user to those antiquated versions, instead of pushing them to migrate.
This is a discussion worth to hace on the MINA dev Mailing List IMHO.
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "the-thing (via GitHub)" <gi...@apache.org>.
the-thing commented on PR #67:
URL: https://github.com/apache/mina/pull/67#issuecomment-5810509469
Understood. I was looking at the
PR https://github.com/apache/mina/pull/61
later merged https://github.com/apache/mina/commit/33b97045f61b3b95c0681aeba0100e42c9b3f1b6
to cherry pick onto 2.1.x, but it diverged quite a bit. This one is more complex though, the test fixes are obviously easier to port.
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "the-thing (via GitHub)" <gi...@apache.org>.
the-thing closed pull request #67: `MdcInjectionFilterTest` - added additional event filtering
URL: https://github.com/apache/mina/pull/67
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "elecharny (via GitHub)" <gi...@apache.org>.
elecharny commented on PR #67:
URL: https://github.com/apache/mina/pull/67#issuecomment-5810089567
FTR, we have 3 'live' branches:
- 2.2.X, the latest branch
- 2.1.X, the 2.1 support branch
- 2.0.X, the 2.0 support branch
The question is whether we backport the fixes from 2.2.X to 2.1.X and 2.0.X or decide to 'kill' the two latest branches...
The problem being that we have pretty much 40% of the downloads for those versions (and we are talking about more than 1M download every month...):
2.0.X: 346 417 downloads last month
2.1.X: 111 578 downloads last month
2.2.X: 648 913 downloads last month
(we even have 23 149 downloads for MINA 1.1.X which is 'dead' since April 23th 2008... 18 years ago!)
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
Re: [PR] `MdcInjectionFilterTest` - added additional event filtering [mina]
Posted by "the-thing (via GitHub)" <gi...@apache.org>.
the-thing commented on PR #67:
URL: https://github.com/apache/mina/pull/67#issuecomment-5810157203
That's a good point. I assumed that 2.2.x is the only one used. I will port this one - https://github.com/apache/mina/pull/68 to other branches as well.
I will also look at the additional changes I made to 2.2.x and try to merge it.
--
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: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org