[JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Martin Gencur edited comment on ISPN-7991 at 7/10/17 4:10 AM:
--------------------------------------------------------------
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller:
{code}
public StringMarshaller() {
this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
was (Author: mgencur):
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Martin Gencur commented on ISPN-7991:
-------------------------------------
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-8036) TestResourceTracker keeps cache managers alive after they are stopped
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-8036?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-8036:
-------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/5275
> TestResourceTracker keeps cache managers alive after they are stopped
> ---------------------------------------------------------------------
>
> Key: ISPN-8036
> URL: https://issues.jboss.org/browse/ISPN-8036
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Core
> Affects Versions: 9.1.0.CR1, 9.0.3.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Labels: testsuite_stability
> Fix For: 9.1.0.Final
>
>
> {{TestCacheManagerFactory.newDefaultCacheManager()}} adds the manager to {{TestResourceTracker}} so if the test doesn't stop it explicitly, {{TestResourceTracker}} will.
> When a test uses {{@CleanupAfterMethod}}, however, the cache managers are stopped and recreated after each method, but the list of resources is only cleared at the end of the test class. If a test has lots of methods, like {{LocalDistributedExecutorTest}} and its subclasses, the stopped managers can use a lot of memory (250KB for each {{ComponentMetadataRepo}}).
> I believe the extra memory usage is causing longer GC pauses, and in turn leads to intermittent test failures in test methods that use short timeouts:
> {noformat}
> 16:58:34,801 ERROR (testng-ReplSyncDistributedExecutorTest:[]) [TestSuiteProgress] Test failed: org.infinispan.distexec.ReplSyncDistributedExecutorTest.testInvokeAnyTimedSleepingTasks
> java.lang.AssertionError: Should have thrown an class java.util.concurrent.TimeoutException
> at org.infinispan.test.Exceptions.assertException(Exceptions.java:21) ~[test-classes/:?]
> at org.infinispan.test.Exceptions.expectException(Exceptions.java:92) ~[test-classes/:?]
> at org.infinispan.distexec.LocalDistributedExecutorTest.testInvokeAnyTimedSleepingTasks(LocalDistributedExecutorTest.java:269) ~[test-classes/:?]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-8036) TestResourceTracker keeps cache managers alive after they are stopped
by Dan Berindei (JIRA)
Dan Berindei created ISPN-8036:
----------------------------------
Summary: TestResourceTracker keeps cache managers alive after they are stopped
Key: ISPN-8036
URL: https://issues.jboss.org/browse/ISPN-8036
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Core
Affects Versions: 9.0.3.Final, 9.1.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 9.1.0.Final
{{TestCacheManagerFactory.newDefaultCacheManager()}} adds the manager to {{TestResourceTracker}} so if the test doesn't stop it explicitly, {{TestResourceTracker}} will.
When a test uses {{@CleanupAfterMethod}}, however, the cache managers are stopped and recreated after each method, but the list of resources is only cleared at the end of the test class. If a test has lots of methods, like {{LocalDistributedExecutorTest}} and its subclasses, the stopped managers can use a lot of memory (250KB for each {{ComponentMetadataRepo}}).
I believe the extra memory usage is causing longer GC pauses, and in turn leads to intermittent test failures in test methods that use short timeouts:
{noformat}
16:58:34,801 ERROR (testng-ReplSyncDistributedExecutorTest:[]) [TestSuiteProgress] Test failed: org.infinispan.distexec.ReplSyncDistributedExecutorTest.testInvokeAnyTimedSleepingTasks
java.lang.AssertionError: Should have thrown an class java.util.concurrent.TimeoutException
at org.infinispan.test.Exceptions.assertException(Exceptions.java:21) ~[test-classes/:?]
at org.infinispan.test.Exceptions.expectException(Exceptions.java:92) ~[test-classes/:?]
at org.infinispan.distexec.LocalDistributedExecutorTest.testInvokeAnyTimedSleepingTasks(LocalDistributedExecutorTest.java:269) ~[test-classes/:?]
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-8036) TestResourceTracker keeps cache managers alive after they are stopped
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-8036?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-8036:
-------------------------------
Status: Open (was: New)
> TestResourceTracker keeps cache managers alive after they are stopped
> ---------------------------------------------------------------------
>
> Key: ISPN-8036
> URL: https://issues.jboss.org/browse/ISPN-8036
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Core
> Affects Versions: 9.1.0.CR1, 9.0.3.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Labels: testsuite_stability
> Fix For: 9.1.0.Final
>
>
> {{TestCacheManagerFactory.newDefaultCacheManager()}} adds the manager to {{TestResourceTracker}} so if the test doesn't stop it explicitly, {{TestResourceTracker}} will.
> When a test uses {{@CleanupAfterMethod}}, however, the cache managers are stopped and recreated after each method, but the list of resources is only cleared at the end of the test class. If a test has lots of methods, like {{LocalDistributedExecutorTest}} and its subclasses, the stopped managers can use a lot of memory (250KB for each {{ComponentMetadataRepo}}).
> I believe the extra memory usage is causing longer GC pauses, and in turn leads to intermittent test failures in test methods that use short timeouts:
> {noformat}
> 16:58:34,801 ERROR (testng-ReplSyncDistributedExecutorTest:[]) [TestSuiteProgress] Test failed: org.infinispan.distexec.ReplSyncDistributedExecutorTest.testInvokeAnyTimedSleepingTasks
> java.lang.AssertionError: Should have thrown an class java.util.concurrent.TimeoutException
> at org.infinispan.test.Exceptions.assertException(Exceptions.java:21) ~[test-classes/:?]
> at org.infinispan.test.Exceptions.expectException(Exceptions.java:92) ~[test-classes/:?]
> at org.infinispan.distexec.LocalDistributedExecutorTest.testInvokeAnyTimedSleepingTasks(LocalDistributedExecutorTest.java:269) ~[test-classes/:?]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months