• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • teck
  • Reporter: tgautier
  • March 04, 2009
  • 0
  • Watchers: 1
  • May 20, 2009
  • April 06, 2009





Paul Stadig 2009-04-03

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).

Tim Eck 2009-04-03

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()

Taylor Gautier 2009-04-03

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


Tim Eck 2009-04-03

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.

Kalai Kannaiyan 2009-05-18

AtomicReferenceTest and AtomicReferenceTestApp tests are added to the framework.