[jira] [Updated] (CASSANDRA-5691) Remove SimpleCondition

2013-06-25 Thread Mikhail Mazursky (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Mazursky updated CASSANDRA-5691:


Attachment: trunk-5691-v2.patch

Attaching v2 patch.

Can you please explain your point of view? Why do you prefer SimpleCondition 
that is not really a Condition to CountDownLatch?

> Remove SimpleCondition
> --
>
> Key: CASSANDRA-5691
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5691
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Mikhail Mazursky
>Priority: Minor
> Attachments: trunk-5691.patch, trunk-5691-v2.patch
>
>
> Problematic scenario:
> 1. two threads get blocked in SimpleCondition.await();
> 2. some thread calls SimpleCondition.signal();
> 3. one of blocked threads wakes up and runs;
> 4. spurious wakeup happens in the second thread and it wakes up too and runs 
> even though nobody signaled it.
> Thus this is a broken implementation of Condition interface.
> Anyway, looking at how code uses it, SimpleCondition can just be replaced 
> with CountDownLatch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5691) Remove SimpleCondition

2013-06-23 Thread Mikhail Mazursky (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-5691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Mazursky updated CASSANDRA-5691:


Attachment: trunk-5691.patch

> Remove SimpleCondition
> --
>
> Key: CASSANDRA-5691
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5691
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Mikhail Mazursky
>Priority: Minor
> Attachments: trunk-5691.patch
>
>
> Problematic scenario:
> 1. two threads get blocked in SimpleCondition.await();
> 2. some thread calls SimpleCondition.signal();
> 3. one of blocked threads wakes up and runs;
> 4. spurious wakeup happens in the second thread and it wakes up too and runs 
> even though nobody signaled it.
> Thus this is a broken implementation of Condition interface.
> Anyway, looking at how code uses it, SimpleCondition can just be replaced 
> with CountDownLatch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira