cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-3576) make AbstractSSTableSimpleWriters threadsafe
Date Tue, 06 Dec 2011 09:59:40 GMT


Sylvain Lebresne commented on CASSANDRA-3576:

It is indeed not thread safe but that was kind of on purpose. It didn't feel like there is
very much use to access the writers concurrently. They are clearly IO bounded, so there isn't
much use to concurrently access them. Besides, for SSTableSimpleWriter, accessing it concurrently
would be a bug anyway. The intention was that the correct use case is one writer per thread,
but multiple thread. And since there is definitively cases where threaf-safety doesn't make
sense, I'd rather avoid the synchronization cost and have people synchronize extraneously
if that is really what they want.

Note that the UnsortedWriter could probably be improving by having it spawn a 'writer' thread,
allowing to continue feed new info in the buffer while the writer thread is busy writting
the previous buffer, but even if we do this internally, the one writer per thread would still
make more sense.
> make AbstractSSTableSimpleWriters threadsafe
> --------------------------------------------
>                 Key: CASSANDRA-3576
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.8.1
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.1
> I took a quick look and the Unsorted writer has a non-threadsafe getColumnFamily method.
 I did not look deeper than that.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message