cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8897) Remove FileCacheService, instead pooling the buffers
Date Wed, 27 May 2015 06:53:18 GMT


Stefania commented on CASSANDRA-8897:

bq. If we double-free, it's a bug, and should be an assertion failure, not a silent success.

Agreed but unfortunately the assertion could also be a cryptic ref already released on the

    at org.apache.cassandra.utils.concurrent.Ref$State.assertNotReleased(
    at org.apache.cassandra.utils.concurrent.Ref.get(
    at org.apache.cassandra.utils.memory.BufferPool$Chunk.getParentChunk(
    at org.apache.cassandra.utils.memory.BufferPool$LocalPool.put(
    at org.apache.cassandra.utils.memory.BufferPool.put(
    at org.apache.cassandra.utils.memory.BufferPoolTest.doMultipleThreadsReleaseBuffers(
    at org.apache.cassandra.utils.memory.BufferPoolTest.testMultipleThreadsReleaseDifferentBuffer(

Is this still OK?

bq. a thread could be executing maybeRecycle, have performed the check to confirm it should
recycle, and then suspend. The allocating thread could then alliocate a buffer,

I cannot see the race because only the owning thread can recycle and other threads do not
have access until the buffer is back in the global pool queue, please refer to the comments
in the code.

bq. The burn test reports this sort of errors with if (index == 64) in get():

The searchMask was picking up extra 1 bits on the left, as soon as the index reached 31.
I changed {{searchMask ^= 1 << index;}} to {{searchMask ^= 1L << index;}} and
that fixed it.
If you want to check it out further you can use {{BufferPoolTest.testBuffersWithGivenSlots()}}
to reproduce it.

More details in the code.

I also rebased.

> Remove FileCacheService, instead pooling the buffers
> ----------------------------------------------------
>                 Key: CASSANDRA-8897
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Stefania
>             Fix For: 3.x
>         Attachments: 9240_test_results.txt, snapshot-1431582436640-cpu-backtraces.png,
snapshot-1431582436640-cpu-calltree-compression-8897.nps, snapshot-1431582436640-cpu-calltree-compression-trunk.nps
> After CASSANDRA-8893, a RAR will be a very lightweight object and will not need caching,
so we can eliminate this cache entirely. Instead we should have a pool of buffers that are

This message was sent by Atlassian JIRA

View raw message