1 Reply Latest reply on Nov 27, 2009 8:50 PM by anothermarcus

    MVCC and writeSkewCheck

      HI everyone,

      I'm using Jboss Tree Cache pojo version NAGA 3.0
      How can I invoke an exception to see the behaviour of the writeSkewCheck?

      I've seen several articles explaining the Phantom Read at a very high level, but down to an API user's level, how can I simulate a skewed write.


      Say for example two threads within the same JVM do

      Cache internalCache = getCache();
      
      Node rootNode = internalCache.getRoot();
      Node sequenceNode = rootNode.getChild(Fqn.fromString(SEQUENCE_FQN));
      
      // READ
      Integer sequence = (Integer) sequenceNode.get(SEQUENCE_FQN);
      
      Thread.sleep(1000);
      // WRITE
      sequenceNode.put(SEQUENCE_FQN, sequence +1);
      


      Will having two threads like this invoke a skewed write that will throw an exception to the user? If so, I'm not seeing it happen.



      Thanks for any advice