Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-5691

Remove SimpleCondition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • None
    • None
    • None
    • Low

    Description

      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.

      Attachments

        1. trunk-5691-v2.patch
          6 kB
          Mikhail Mazursky
        2. trunk-5691.patch
          20 kB
          Mikhail Mazursky

        Activity

          People

            ash2k Mikhail Mazursky
            ash2k Mikhail Mazursky
            Mikhail Mazursky
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: