users@grizzly.java.net

Re: Parallel writes revisited: bug or me?

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Thu, 16 Feb 2012 11:27:57 +0100

Hi Matt,

On 02/15/2012 08:31 PM, Matthew Swift wrote:
>
>
> On 15 February 2012 19:50, Ryan Lubke <ryan.lubke_at_oracle.com
> <mailto:ryan.lubke_at_oracle.com>> wrote:
>
> [...]
> No, I think, like you said, you've just hit a side-effect of a fix
> that was made to prevent memory leaks.
> Would you mind opening an issue on this and either Alexey or
> myself can look into it asap?
>
Frankly saying, I was planning to make FilterChain immutable, so it
would be created once using Builder and then you'll not be able to
update it.
Otherwise, if we make FilterChain mutable (properly mutable) and
thread-safe - it may cause significant performance degradation.

The easy way to work it around is to add *all* Filters to the chain in
the beginning and then introduce some boolean Attribute inside given
Filter and check whether Connection has already passed Filter's specific
checking or not, if yes - immediately return context.getInvokeAction();
and pass control to the next filter in chain.

Will appreciate your feedback on this :)

Thanks.

WBR,
Alexey.