[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1244) Data loss possible during state transfer when numOwners == 1
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Fri Jul 15 12:36:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manik Surtani updated ISPN-1244:
--------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/infinispan/infinispan/pull/447
> Data loss possible during state transfer when numOwners == 1
> ------------------------------------------------------------
>
> Key: ISPN-1244
> URL: https://issues.jboss.org/browse/ISPN-1244
> Project: Infinispan
> Issue Type: Bug
> Components: Distributed Cache
> Affects Versions: 5.0.0.CR7
> Environment: single machine (Mac is my case)
> Reporter: Alex Heneveld
> Assignee: Manik Surtani
>
> I have a test (below) which creates a CacheManager and Cache, sets a value, waits a bit, creates another CacheManager and Cache, then tries to get the value from the first cache. Only it gets null instead -- from both caches!
> Am new to Infinispan but discussed with Sanne who recommended to file as a bug.
> Originally discussed in community forum [here|http://community.jboss.org/message/615497].
> {code}
> public void bug() throws InterruptedException {
> EmbeddedCacheManager cm1 = newCM();
> Cache c1 = cm1.getCache("x");
> c1.put("key", "value");
> Thread.sleep(3000);
> EmbeddedCacheManager cm2 = newCM();
> System.out.println(c1.get("key")); //always says "value"
> Cache c2 = cm2.getCache("x");
> System.out.println(c1.get("key")); //says null sometimes
> assert c1.get("key") != null : "value at cache 1 was lost";
> cm1.stop();
> cm2.stop();
> }
> public EmbeddedCacheManager newCM() {
> GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
> Configuration cfg = new Configuration().fluent()
> .mode(Configuration.CacheMode.DIST_SYNC)
> .hash().numOwners(1)
> .clustering().l1().disable()
> .build();
> return new DefaultCacheManager(gc, cfg);
> }
> {code}
> (BTW changing to REPL_SYNC, or numOwners(2), it works fine.)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list