cassandra-commits mailing list archives

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

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

Peter Schuller commented on CASSANDRA-2521:
-------------------------------------------

@jbellis The *unlink* is fine (just like with files that are opened w/o mmap), but the actual
deletion has to be postponed for fundamental reasons: How would the userland application be
informed of an attempted access? You could segfault of course, or similar delivery of an asynchronous
event, but that's not very useful to most applications.

This closely relates to why Java doesn't allow forced munmap to begin with; having to do some
kind of synchronization to allow safe access to munmapped memory in a way that doesn't violate
the Java sandbox, would be very costly given that a large point of mmap is to utilize the
CPU's MMU in the non-faulting case for a minimum of overhead.

(I'm very much +1 on not using the GC for external resources like sstables (for trunk).)

@jbellis And yes we can do our "own" mmap:ing with JNA as an alternative, but given that tjake's
solution should work for Sun JVM:s even without JNA that seems preferable to me. Longer term
support for non-hotspot JVM:s seems like a lesser concern. Cassandra isn't really something
you want to run on an "arbitrary" JVM anyway.



> 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