I don't think there is a race condition because the allocation occurs
atomically in the BlockLocks class.  Do see a problem?  Let me know.

Aaron

On Wed, Jul 20, 2016 at 9:19 AM, Ravikumar Govindarajan <
[email protected]> wrote:

> I came across the following in SlabAllocationCacheValueBufferPool.java. Is
> the below method thread-safe?
>
>  @Override
>
>   public CacheValue getCacheValue(int cacheBlockSize) {
>
>     validCacheBlockSize(cacheBlockSize);
>
>     int numberOfChunks = getNumberOfChunks(cacheBlockSize);
>
>     ...
>
>    }
>
>
> It does allocation in a tight-loop using BlockLocks, Slab & Chunks. Is
> there a race-condition where 2 threads can pick same slab & chunk?
>

Reply via email to