[logback-user] TurboFilter thread-safety?

César Álvarez Núñez cesar.alvarez.nunez at gmail.com
Tue Mar 15 00:09:46 CET 2011


Hello Ceki,

I`ve just created *LBCLASSIC-255
<http://jira.qos.ch/browse/LBCLASSIC-255>*including a patch that solve
it and its test case.

BR,
/César-


On Mon, Feb 21, 2011 at 4:28 PM, Ceki Gülcü <ceki at qos.ch> wrote:

>
> Hello César,
>
> Logback does not use any synchronization when invoking turbo filters.
> TurboFilters needs to ensure they are thread safe on their own. The fact
> that DuplicateMessageFilter does not synchronize on LinkedHashMap is
> probably a bug. Could you please enter a bug report for the issue you just
> discovered?
>
>
>
> On 21/02/2011 3:28 PM, César Álvarez Núñez wrote:
>
>> Hi all,
>>
>> I would like to known if TurboFilter is multithread-safe or not since
>> the manual does not say anything about it.
>>
>> Reviewing
>>
>> https://github.com/ceki/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/turbo/DuplicateMessageFilter.java
>> I have seen that a it makes use of a LinkedHashMap
>> (
>> http://download.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html
>> )
>> which requires synchronization in case of multithread access.
>>
>> BR,
>> /César.
>>
>>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110315/00dc5bca/attachment.html>


More information about the Logback-user mailing list