cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Jake Luciani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2521) Move away from Phantom References for Compaction/Memtable
Date Thu, 16 Jun 2011 16:51:47 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050560#comment-13050560
] 

T Jake Luciani commented on CASSANDRA-2521:
-------------------------------------------

We could use this trick:

{noformat}

  try {
        // Manually free the old buffer using undocumented unsafe APIs.
        // If this fails, we'll drop the reference and hope GC finds it
        // eventually.
        Object cleaner = buf.getClass().getMethod("cleaner").invoke(buf);
        cleaner.getClass().getMethod("clean").invoke(cleaner);
      } catch (Exception e) {
        // Perhaps a non-sun-derived JVM - contributions welcome
        LOG.warn("Couldn't realloc bytebuffer", e);
      }

{noformat}

> Move away from Phantom References for Compaction/Memtable
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-2521
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2521
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Chris Goffinet
>            Assignee: Sylvain Lebresne
>             Fix For: 1.0
>
>         Attachments: 0001-Use-reference-counting-to-decide-when-a-sstable-can-.patch
>
>
> http://wiki.apache.org/cassandra/MemtableSSTable
> Let's move to using reference counting instead of relying on GC to be called in StorageService.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message