When I'm debugging, if it is single threaded CachedSqlEntityProcessor.getAllNonCachedRows is called only once, all the rows cached and next time it requests a row it gets it from the cached data. In the logs I see the SQL call only once.
If I use multiple threads, it calls CachedSqlEntityProcessor.getAllNonCachedRows multiple times, so it creates a new cache per thread. The cache should be shared among threads and be safe, right? Thanks! Maria On 10/1/11 8:00 PM, "pulkitsing...@gmail.com" <pulkitsing...@gmail.com> wrote: > What part of the source code in debug mode behaved in a fashion such as to > make it seem like it is not thread-safe? > > If it feels difficult to put into words then you can always make a small 5 min > screencast to demo the issue and talk about it. I do that for really complex > stuff with Jing by techsmith (free version). > > Or you can put up a small and simplified test case together to demo the issue > and then paste the link for that hosted attachment :) > > Sent from my iPhone > > On Sep 30, 2011, at 1:28 PM, Maria Vazquez <maria.vazq...@dexone.com> wrote: > >> Hi, >> I¹m using threads with JdbcDataStore and CachedSqlEntityProcessor. >> I noticed that if I make it single threaded CachedSqlEntityProcessor behaves >> as expected (it only queries the db once and caches all the rows). If I make >> it multi threaded it seems to make multiple db queries and when I debug the >> source code it looks like it is not thread safe. >> Any ideas? >> Thanks, >> Maria >>