From jira-events at lists.jboss.org Thu Dec 23 09:49:18 2010 Content-Type: multipart/mixed; boundary="===============4209567684571366351==" MIME-Version: 1.0 From: =?utf-8?q?Galder_Zamarre=C3=B1o_=28JIRA=29_=3Cjira-events_at_lists=2Ejbos?= =?utf-8?q?s=2Eorg=3E?= To: infinispan-issues at lists.jboss.org Subject: [infinispan-issues] [JBoss JIRA] Updated: (ISPN-841) Flag.CACHE_MODE_LOCAL is not working properly for put operation in TreeCache Date: Thu, 23 Dec 2010 09:49:18 -0500 Message-ID: <102117163.23436.1293115758131.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1422751005.12457.1292848097991.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============4209567684571366351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/ISPN-841?page=3Dcom.atlassian.jira.p= lugin.system.issuetabpanels:all-tabpanel ] Galder Zamarre=C3=B1o updated ISPN-841: ---------------------------------- Steps to Reproduce: See attached TestInfinispan.java file. (was: packa= ge com.db.fdr.test.cache; import java.util.Properties; import java.util.concurrent.CyclicBarrier; import org.infinispan.Cache; import org.infinispan.config.Configuration; import org.infinispan.config.GlobalConfiguration; import org.infinispan.context.Flag; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.tree.Fqn; import org.infinispan.tree.TreeCache; import org.infinispan.tree.TreeCacheFactory; import org.infinispan.util.concurrent.IsolationLevel; import com.db.fdr.test.TestCase; /** *

* Copyright 2010 Deutsche Bank * * @author Konstantin Kuzmin<= /a> * @version $Revision$ * @since Dec 17, 2010 */ public class TestInfinispan extends TestCase { private Cache cache1; private Cache cache2; private TreeCache treeCache1; private TreeCache treeCache2; private static final String KEY =3D "key"; public static Cache createCache() throws Exception { final GlobalConfiguration gc =3D GlobalConfiguration.getClusteredDe= fault(); final Properties p =3D new Properties(); p.setProperty("configurationFile", "jgroups-config.xml"); gc.setTransportProperties(p); final Configuration configuration =3D new Configuration(); configuration.setCacheMode(Configuration.CacheMode.INVALIDATION_SYN= C); configuration.setTransactionManagerLookupClass("org.infinispan.tran= saction.lookup.DummyTransactionManagerLookup"); configuration.setIsolationLevel(IsolationLevel.READ_COMMITTED); configuration.setLockAcquisitionTimeout(1000L); configuration.setSyncCommitPhase(true); configuration.setSyncRollbackPhase(true); configuration.setUseLockStriping(true); configuration.setConcurrencyLevel(500); configuration.setInvocationBatchingEnabled(true); final EmbeddedCacheManager manager =3D new DefaultCacheManager(gc, = configuration, true); return manager.getCache(); } public static TreeCache createTreeCache(final Cache cache) throws Excep= tion { final TreeCacheFactory tcf =3D new TreeCacheFactory(); return tcf.createTreeCache(cache); } @Override protected void setUp() throws Exception { super.setUp(); cache1 =3D createCache(); cache2 =3D createCache(); } public void testCacheLocalPut() throws Exception { cache1.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL).put(KEY,= "1"); cache2.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL).put(KEY,= "2"); assertEquals("cache2 was updated locally", "2", cache2.get(KEY)); assertEquals("cache1 should not be invalidated in case of LOCAL put= in cache2", "1", cache1.get(KEY)); } public void testTreeCacheLocalPut() throws Exception { treeCache1 =3D createTreeCache(cache1); treeCache2 =3D createTreeCache(cache2); final Fqn fqn =3D Fqn.fromElements("TEST"); treeCache1.put(fqn, KEY, "1", Flag.CACHE_MODE_LOCAL); treeCache2.put(fqn, KEY, "2", Flag.CACHE_MODE_LOCAL); assertEquals("treeCache2 was updated locally", "2", treeCache2.get(= fqn, KEY)); assertEquals("treeCache1 should not be invalidated in case of LOCAL= put in treeCache2", "1", treeCache1.get(fqn, KEY)); } } ) > Flag.CACHE_MODE_LOCAL is not working properly for put operation in TreeCa= che > -------------------------------------------------------------------------= --- > > Key: ISPN-841 > URL: https://issues.jboss.org/browse/ISPN-841 > Project: Infinispan > Issue Type: Bug > Components: Tree API > Affects Versions: 4.1.0.Final > Environment: Windows XP Professional SP3 > Reporter: Konstantin Kuzmin > Assignee: Galder Zamarre=C3=B1o > Fix For: 5.0.0.BETA1 > > Attachments: TestInfinispan.java > > > Actually, the problem might be wider. I suppose the Flag set is not propa= gated to underlying (Cache) infrastructure in some cases. -- = This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira = --===============4209567684571366351==--