Possible Concurrency Issues ?

4 views
Skip to first unread message

Iman Rahmatizadeh

unread,
Sep 23, 2010, 6:36:39 AM9/23/10
to Salve
Hi,
Just by taking a quick look at the get & put methods in the Lru3Cache
class in salve(1.1), it seems to me it might have concurrency issues
with multiple threads. for example one thread will find a bean in
element #2 and one in #0, but before returning the element the other
one swaps it place.
Actually I made a custom implementation of Cache interface, similar to
Lru3Cache, and had this problem in high loads on my server, where a
wrong bean was returned in place of the actual one. It seems the
original impl. might also have this problem. Anybody else seen this
problem ?

Iman

Igor Vaynberg

unread,
Sep 23, 2010, 11:00:56 AM9/23/10
to salve...@googlegroups.com
afair the original impl keeps the cache in a threadlocal

-igor

> --
> You received this message because you are subscribed to the Google Groups "Salve" group.
> To post to this group, send email to salve...@googlegroups.com.
> To unsubscribe from this group, send email to salve-disc+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/salve-disc?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages