You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2014/12/17 00:17:14 UTC
[jira] [Commented] (CASSANDRA-7757) Possible Atomicity Violations
in StreamSession and ThriftSessionManager
[ https://issues.apache.org/jira/browse/CASSANDRA-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249152#comment-14249152 ]
Jonathan Ellis commented on CASSANDRA-7757:
-------------------------------------------
Is this still relevant to 2.1?
> Possible Atomicity Violations in StreamSession and ThriftSessionManager
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-7757
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7757
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Diogo Sousa
> Assignee: Yuki Morishita
> Priority: Minor
>
> I'm developing a tool for atomicity violation detection and I think it have found two atomicity violations in cassandra.
> In org.apache.cassandra.streaming.StreamSession there might be an atomicity violation in method addTransferFiles(), lines 310-314:
> {noformat}
> 310: StreamTransferTask task = transfers.get(cfId);
> if (task == null)
> {
> task = new StreamTransferTask(this, cfId);
> 314: transfers.put(cfId, task);
> }
> {noformat}
> A concurrent thread can insert a transfer with the same uuid creating two StreamTransferTask, and only one get into "transfers".
> In org.apache.cassandra.thrift.ThriftSessionManager, a simular situation can occur in method currentSession(), lines 57-61:
> {noformat}
> 57: ThriftClientState cState = activeSocketSessions.get(socket);
> if (cState == null)
> {
> cState = new ThriftClientState(socket);
> 51: activeSocketSessions.put(socket, cState);
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)