[JBoss JIRA] (ISPN-3560) Size after a suspended transaction is resumed is incorrectly calculated
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-3560?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-3560:
--------------------------------
Status: Pull Request Sent (was: Coding In Progress)
> Size after a suspended transaction is resumed is incorrectly calculated
> -----------------------------------------------------------------------
>
> Key: ISPN-3560
> URL: https://issues.jboss.org/browse/ISPN-3560
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.3.0.Final, 6.0.0.Beta1
> Reporter: Galder Zamarreño
> Assignee: William Burns
> Fix For: 6.0.0.CR1, 6.0.0.Final
>
>
> {code}
> public void testSizeAfterClearInBranchedTransaction() throws Exception {
> cache.put(1, "v1");
> tm().begin();
> try {
> assertEquals("v1", cache.get(1));
> Transaction suspended = tm().suspend();
> tm().begin();
> try {
> cache.clear();
> } finally {
> tm().commit();
> tm().resume(suspended);
> assertEquals(1, cache.size()); // assertion fails
> assertEquals("v1", cache.get(1));
> }
> } finally {
> tm().commit();
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 3 months
[JBoss JIRA] (ISPN-3562) File cache store ignores maxEntries property
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-3562?page=com.atlassian.jira.plugin.... ]
Martin Gencur updated ISPN-3562:
--------------------------------
Priority: Major (was: Minor)
> File cache store ignores maxEntries property
> --------------------------------------------
>
> Key: ISPN-3562
> URL: https://issues.jboss.org/browse/ISPN-3562
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 6.0.0.Beta1
> Reporter: Martin Gencur
> Assignee: Mircea Markus
> Fix For: 6.0.0.Final
>
>
> The following test fails if the new file cache store is configured with maxEntries property:
> {code:java}
> @Test
> public void testMaxEntriesAndLocationParametersDuringRestart() throws Exception {
> controller.start(CONTAINER);
> RemoteCacheManager rcm = new RemoteCacheManager(new ConfigurationBuilder().addServer()
> .host(server.getHotrodEndpoint().getInetAddress().getHostName())
> .port(server.getHotrodEndpoint().getPort())
> .build());
> RemoteCache<String, String> rc = rcm.getCache();
> rc.clear();
> assertNull(rc.get("k1"));
> rc.put("k1", "v1");
> rc.put("k2", "v2");
> rc.put("k3", "v3");
> assertEquals("v1", rc.get("k1"));
> assertEquals("v2", rc.get("k2"));
> assertEquals("v3", rc.get("k3"));
> //assert the existence of a single file in the filesystem
> File f = new File(singleFCSPath, "default.dat");
> assertTrue(f.exists());
> //assert that SingleFileCacheStore was registered
> MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider(server.getHotrodEndpoint().getInetAddress().getHostName(), MANAGEMENT_PORT);
> assertEquals("[org.infinispan.persistence.file.SingleFileStore]", getAttribute(provider, CACHE_LOADER_MBEAN, "stores"));
> controller.kill(CONTAINER);
> controller.start(CONTAINER);
> assertEquals("v2", rc.get("k2"));
> assertEquals("v3", rc.get("k3"));
> assertNull(rc.get("k1")); //maxEntries was 2, this entry should be lost as the oldest entries are removed
> //^^^^fails here, the entry is still there
> controller.stop(CONTAINER);
> }
> {code}
> Cache configuration:
> {code}
> <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="default">
> <cache-container name="default" default-cache="default" listener-executor="infinispan-listener" eviction-executor="infinispan-eviction" replication-queue-executor="infinispan-repl-queue">
> <local-cache name="default" start="EAGER">
> <locking isolation="NONE" acquire-timeout="30000" concurrency-level="1000" striping="false"/>
> <transaction mode="NONE"/>
> <file-store
> passivation="false"
> preload="false"
> purge="false"
> relative-to="temp"
> path="single-file-cache-store"
> >
> <property name="maxEntries">2</property>
> </file-store>
> </local-cache>
> </cache-container>
> </subsystem>
> {code}
> The complete test is here: https://code.engineering.redhat.com/gerrit/gitweb?p=jdg-functional-tests....
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 3 months
[JBoss JIRA] (ISPN-3562) File cache store ignores maxEntries property
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3562?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-3562:
-----------------------------------------------
Martin Gencur <mgencur(a)redhat.com> made a comment on [bug 1012581|https://bugzilla.redhat.com/show_bug.cgi?id=1012581]
See bug description description in linked JIRA
> File cache store ignores maxEntries property
> --------------------------------------------
>
> Key: ISPN-3562
> URL: https://issues.jboss.org/browse/ISPN-3562
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 6.0.0.Beta1
> Reporter: Martin Gencur
> Assignee: Mircea Markus
> Priority: Minor
> Fix For: 6.0.0.Final
>
>
> The following test fails if the new file cache store is configured with maxEntries property:
> {code:java}
> @Test
> public void testMaxEntriesAndLocationParametersDuringRestart() throws Exception {
> controller.start(CONTAINER);
> RemoteCacheManager rcm = new RemoteCacheManager(new ConfigurationBuilder().addServer()
> .host(server.getHotrodEndpoint().getInetAddress().getHostName())
> .port(server.getHotrodEndpoint().getPort())
> .build());
> RemoteCache<String, String> rc = rcm.getCache();
> rc.clear();
> assertNull(rc.get("k1"));
> rc.put("k1", "v1");
> rc.put("k2", "v2");
> rc.put("k3", "v3");
> assertEquals("v1", rc.get("k1"));
> assertEquals("v2", rc.get("k2"));
> assertEquals("v3", rc.get("k3"));
> //assert the existence of a single file in the filesystem
> File f = new File(singleFCSPath, "default.dat");
> assertTrue(f.exists());
> //assert that SingleFileCacheStore was registered
> MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider(server.getHotrodEndpoint().getInetAddress().getHostName(), MANAGEMENT_PORT);
> assertEquals("[org.infinispan.persistence.file.SingleFileStore]", getAttribute(provider, CACHE_LOADER_MBEAN, "stores"));
> controller.kill(CONTAINER);
> controller.start(CONTAINER);
> assertEquals("v2", rc.get("k2"));
> assertEquals("v3", rc.get("k3"));
> assertNull(rc.get("k1")); //maxEntries was 2, this entry should be lost as the oldest entries are removed
> //^^^^fails here, the entry is still there
> controller.stop(CONTAINER);
> }
> {code}
> Cache configuration:
> {code}
> <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="default">
> <cache-container name="default" default-cache="default" listener-executor="infinispan-listener" eviction-executor="infinispan-eviction" replication-queue-executor="infinispan-repl-queue">
> <local-cache name="default" start="EAGER">
> <locking isolation="NONE" acquire-timeout="30000" concurrency-level="1000" striping="false"/>
> <transaction mode="NONE"/>
> <file-store
> passivation="false"
> preload="false"
> purge="false"
> relative-to="temp"
> path="single-file-cache-store"
> >
> <property name="maxEntries">2</property>
> </file-store>
> </local-cache>
> </cache-container>
> </subsystem>
> {code}
> The complete test is here: https://code.engineering.redhat.com/gerrit/gitweb?p=jdg-functional-tests....
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 3 months