Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: 2 Major 2 Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.1
    • Component/s: None
    • Labels:
      None
    • Severity:
      3 Feature failure (but usable), workaround available
    • Fix In Branch:
      trunk

      Activity

      Hide
      Paul Stadig added a comment -

      I had some discussion on the tc-users group about my work getting Clojure to work with Terracotta. One of the issues was AtomicReference being unsupported. It was suggested that it would be a simple enough task for a non-TC developer to complete.

      I think I did this right, not sure. I removed the permanent exclude for AtomicReference, added a test case, and added AtomicReference to the Jdk15PreInstrumentedConfiguration class.

      Let me know if something isn't right, and I need to rework it.

      I e-mailed a copy of my scanned contributors agreement yesterday (2009-04-02).

      Show
      Paul Stadig added a comment - I had some discussion on the tc-users group about my work getting Clojure to work with Terracotta. One of the issues was AtomicReference being unsupported. It was suggested that it would be a simple enough task for a non-TC developer to complete. I think I did this right, not sure. I removed the permanent exclude for AtomicReference, added a test case, and added AtomicReference to the Jdk15PreInstrumentedConfiguration class. Let me know if something isn't right, and I need to rework it. I e-mailed a copy of my scanned contributors agreement yesterday (2009-04-02).
      Hide
      Tim Eck added a comment -

      Code looks good Paul, thanks! The test fails occasionally though (more often with 1.6 for some reason). I've tracked it down to the compareAndSet() failing (it is returning false). The underlying problem there seems to be unlucky timing with cleanup of the interned string pool.

      I'm going to change the test in a few ways:
      1) Get rid of the DataRoot and use the AtomicReference instance as the root itself (just makes the code easier to read IMO)
      2) Avoid probs with intern'd Strings
      3) check return values of compareAndSet() and weakCompareAndSet()

      Show
      Tim Eck added a comment - Code looks good Paul, thanks! The test fails occasionally though (more often with 1.6 for some reason). I've tracked it down to the compareAndSet() failing (it is returning false). The underlying problem there seems to be unlucky timing with cleanup of the interned string pool. I'm going to change the test in a few ways: 1) Get rid of the DataRoot and use the AtomicReference instance as the root itself (just makes the code easier to read IMO) 2) Avoid probs with intern'd Strings 3) check return values of compareAndSet() and weakCompareAndSet()
      Hide
      Taylor Gautier added a comment - - edited

      when this bug is committed, please make sure to add a task that we will need to update the Unsupported Classes documentation.

      Thanks.

      Show
      Taylor Gautier added a comment - - edited when this bug is committed, please make sure to add a task that we will need to update the Unsupported Classes documentation. Thanks.
      Hide
      Tim Eck added a comment -

      Chris (who is much smarter than me) has corrected me about why this test fails. It has to do with the fact they TC will ease the intern()'d -ness of the String literals travelling through the AtomicReference accross nodes. When the string is materialized on another node it will be constructed via new String() and thus the CAS won't always work.

      Show
      Tim Eck added a comment - Chris (who is much smarter than me) has corrected me about why this test fails. It has to do with the fact they TC will ease the intern()'d -ness of the String literals travelling through the AtomicReference accross nodes. When the string is materialized on another node it will be constructed via new String() and thus the CAS won't always work.
      Hide
      Kalai Kannaiyan added a comment -

      AtomicReferenceTest and AtomicReferenceTestApp tests are added to the framework.

      Show
      Kalai Kannaiyan added a comment - AtomicReferenceTest and AtomicReferenceTestApp tests are added to the framework.

        People

        • Assignee:
          Tim Eck
          Reporter:
          Taylor Gautier
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: