cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-3085) Race condition in sstable reference counting
Date Sun, 28 Aug 2011 21:58:37 GMT


Jonathan Ellis updated CASSANDRA-3085:

    Attachment: 3085-v2.txt

v2 encapsulates the lockless atomic acquisition in CFS.markReferenced(Interval).

Not 100% sure how important the changes to the getRangeSlice tokens were, that I took out.

If we need those, we might need to make getRangeSlice loop manually w/o the encapsulation,
since we need the view to compute the Interval, but we need the Interval to search for sstables.

> Race condition in sstable reference counting
> --------------------------------------------
>                 Key: CASSANDRA-3085
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Critical
>             Fix For: 1.0
>         Attachments: 3085-v2.txt, 3085.txt
> DataTracker gives us an atomic View of memtable/sstables, but acquiring references is
not atomic.  So it is possible to acquire references to an SSTableReader object that is no
longer valid, as in this example:
> View V contains sstables {A, B}.  We attempt a read in thread T using this View.
> Meanwhile, A and B are compacted to {C}, yielding View W.  No references exist to A or
B so they are cleaned up.
> Back in thread T we acquire references to A and B.  This does not cause an error, but
it will when we attempt to read from them next.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message