cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5691) Remove SimpleCondition
Date Mon, 24 Jun 2013 13:40:20 GMT


Jonathan Ellis commented on CASSANDRA-5691:

Yes, it's pretty obvious that signal==signalAll in SimpleCondition.  (Signaling just a single
waiter is fairly useless and not something we care about.)

Unless CDL offers a performance benefit I don't see any point in churning this.
> Remove SimpleCondition
> ----------------------
>                 Key: CASSANDRA-5691
>                 URL:
>             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:

View raw message