[JBoss JIRA] (ISPN-12315) Protostream transcoder can't handle Content-type with java primitive types
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-12315?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-12315:
-------------------------------------
Description:
Create a protostream cache:
{noformat}
curl -u user:user -H "Content-Type: application/json" -d '{"distributed-cache":{"mode":"SYNC","encoding":{"key":{"media-type":"application/x-protostream"},"value":{"media-type":"application/x-protostream"}}}}' http://127.0.0.1:11222/rest/v2/caches/myCache
{noformat}
Insert K and V as {{java.lang.Integer}}:
{noformat}
curl -XPUT -v -u user:user -H "Key-Content-Type: application/x-java-object; type=java.lang.Integer" -H "Content-Type: application/x-java-object; type=java.lang.Integer" -d '1' "http://localhost:11222/rest/v2/caches/myCache/1"
{noformat}
When trying to change the existing value under the same key to another integer value:
{noformat}
curl -XPUT -v -u user:user -H "Key-Content-Type: application/x-java-object; type=java.lang.Integer" -H "Content-Type: application/x-java-object; type=java.lang.Integer" -d '2' "http://localhost:11222/rest/v2/caches/myCache/1"
{noformat}
it throws an error: "No marshaller registered for Java type java.lang.Integer"
was:
Create a protostream cache:
{noformat}
curl -u user:user -H "Content-Type: application/json" -d '{"distributed-cache":{"mode":"SYNC","encoding":{"key":{"media-type":"application/x-protostream"},"value":{"media-type":"application/x-protostream"}}}}' http://127.0.0.1:11222/rest/v2/caches/myCache
{noformat}
Insert K and V as {{java.lang.Integer}}:
{noformat}
curl -XPUT -v -u user:user -H "Key-Content-Type: application/x-java-object; type=java.lang.Integer" -H "Content-Type: application/x-java-object; type=java.lang.Integer" -d '1' "http://localhost:11222/rest/v2/caches/myCache/1"
{noformat}
> Protostream transcoder can't handle Content-type with java primitive types
> --------------------------------------------------------------------------
>
> Key: ISPN-12315
> URL: https://issues.redhat.com/browse/ISPN-12315
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 11.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
>
> Create a protostream cache:
> {noformat}
> curl -u user:user -H "Content-Type: application/json" -d '{"distributed-cache":{"mode":"SYNC","encoding":{"key":{"media-type":"application/x-protostream"},"value":{"media-type":"application/x-protostream"}}}}' http://127.0.0.1:11222/rest/v2/caches/myCache
> {noformat}
> Insert K and V as {{java.lang.Integer}}:
> {noformat}
> curl -XPUT -v -u user:user -H "Key-Content-Type: application/x-java-object; type=java.lang.Integer" -H "Content-Type: application/x-java-object; type=java.lang.Integer" -d '1' "http://localhost:11222/rest/v2/caches/myCache/1"
> {noformat}
> When trying to change the existing value under the same key to another integer value:
> {noformat}
> curl -XPUT -v -u user:user -H "Key-Content-Type: application/x-java-object; type=java.lang.Integer" -H "Content-Type: application/x-java-object; type=java.lang.Integer" -d '2' "http://localhost:11222/rest/v2/caches/myCache/1"
> {noformat}
> it throws an error: "No marshaller registered for Java type java.lang.Integer"
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-12314) lsof check is too expensive
by Dan Berindei (Jira)
Dan Berindei created ISPN-12314:
-----------------------------------
Summary: lsof check is too expensive
Key: ISPN-12314
URL: https://issues.redhat.com/browse/ISPN-12314
Project: Infinispan
Issue Type: Bug
Components: Build
Affects Versions: 12.0.0.Dev03
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 12.0.0.Dev04
ISPN-12280 added a test run of {{lsof}} {{infinispan-server.xml}}, to ensure that it exists before trying to start the server and finding out that we can't kill it. Unfortunately, the test run is without any arguments, so the command execution takes a long time and lists all the open files in the system and put them in a system property.
On my system, the output of {{lsof}} is 86MB, and now I can't run {{mvn -X}} with {{-Xmx512m}} any more.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-12314) lsof check is too expensive
by Dan Berindei (Jira)
[ https://issues.redhat.com/browse/ISPN-12314?page=com.atlassian.jira.plugi... ]
Dan Berindei updated ISPN-12314:
--------------------------------
Status: Open (was: New)
> lsof check is too expensive
> ---------------------------
>
> Key: ISPN-12314
> URL: https://issues.redhat.com/browse/ISPN-12314
> Project: Infinispan
> Issue Type: Bug
> Components: Build
> Affects Versions: 12.0.0.Dev03
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 12.0.0.Dev04
>
>
> ISPN-12280 added a test run of {{lsof}} {{infinispan-server.xml}}, to ensure that it exists before trying to start the server and finding out that we can't kill it. Unfortunately, the test run is without any arguments, so the command execution takes a long time and lists all the open files in the system and put them in a system property.
> On my system, the output of {{lsof}} is 86MB, and now I can't run {{mvn -X}} with {{-Xmx512m}} any more.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-12313) NPE when querying
by Gustavo Fernandes (Jira)
Gustavo Fernandes created ISPN-12313:
----------------------------------------
Summary: NPE when querying
Key: ISPN-12313
URL: https://issues.redhat.com/browse/ISPN-12313
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying
Affects Versions: 11.0.3.Final
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
Happened on a load testing with 10 threads executing a query against a single node:
{noformat}
java.util.concurrent.CompletionException: org.hibernate.search.exception.SearchException: Exception while searching locally
at java.util.concurrent.CompletableFuture.encodeThrowable (CompletableFuture.java:314)
at java.util.concurrent.CompletableFuture.completeThrowable (CompletableFuture.java:319)
at java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1766)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:630)
at java.lang.Thread.run (Thread.java:832)
Caused by: org.hibernate.search.exception.SearchException: Exception while searching locally
at org.infinispan.query.clustered.ClusteredQueryInvoker.broadcast (ClusteredQueryInvoker.java:114)
at org.infinispan.query.clustered.ClusteredCacheQueryImpl.broadcastQuery (ClusteredCacheQueryImpl.java:113)
at org.infinispan.query.clustered.ClusteredCacheQueryImpl.iterator (ClusteredCacheQueryImpl.java:84)
at org.infinispan.query.impl.CacheQueryImpl.iterator (CacheQueryImpl.java:144)
at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.iterator (EmbeddedLuceneQuery.java:93)
at org.infinispan.query.core.impl.HybridQuery.getBaseIterator (HybridQuery.java:48)
at org.infinispan.query.core.impl.HybridQuery.getInternalIterator (HybridQuery.java:44)
at org.infinispan.query.core.impl.BaseEmbeddedQuery.listInternal (BaseEmbeddedQuery.java:84)
at org.infinispan.query.core.impl.BaseEmbeddedQuery.execute (BaseEmbeddedQuery.java:65)
at org.infinispan.query.core.impl.DelegatingQuery.execute (DelegatingQuery.java:111)
at org.infinispan.query.QueryPerf$TimeBoundQueryNode.executeTask (QueryPerf.java:444)
at org.infinispan.query.QueryPerf$TaskNode.lambda$run$1 (QueryPerf.java:306)
at java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1764)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:630)
at java.lang.Thread.run (Thread.java:832)
Caused by: java.util.concurrent.ExecutionException: org.hibernate.search.exception.SearchException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report (FutureTask.java:122)
at java.util.concurrent.FutureTask.get (FutureTask.java:191)
at org.infinispan.query.clustered.ClusteredQueryInvoker.broadcast (ClusteredQueryInvoker.java:104)
at org.infinispan.query.clustered.ClusteredCacheQueryImpl.broadcastQuery (ClusteredCacheQueryImpl.java:113)
at org.infinispan.query.clustered.ClusteredCacheQueryImpl.iterator (ClusteredCacheQueryImpl.java:84)
at org.infinispan.query.impl.CacheQueryImpl.iterator (CacheQueryImpl.java:144)
at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.iterator (EmbeddedLuceneQuery.java:93)
at org.infinispan.query.core.impl.HybridQuery.getBaseIterator (HybridQuery.java:48)
at org.infinispan.query.core.impl.HybridQuery.getInternalIterator (HybridQuery.java:44)
at org.infinispan.query.core.impl.BaseEmbeddedQuery.listInternal (BaseEmbeddedQuery.java:84)
at org.infinispan.query.core.impl.BaseEmbeddedQuery.execute (BaseEmbeddedQuery.java:65)
at org.infinispan.query.core.impl.DelegatingQuery.execute (DelegatingQuery.java:111)
at org.infinispan.query.QueryPerf$TimeBoundQueryNode.executeTask (QueryPerf.java:444)
at org.infinispan.query.QueryPerf$TaskNode.lambda$run$1 (QueryPerf.java:306)
at java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1764)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:630)
at java.lang.Thread.run (Thread.java:832)
Caused by: org.hibernate.search.exception.SearchException: java.lang.NullPointerException
at org.infinispan.query.clustered.ClusteredQueryInvoker.lambda$localInvoke$4 (ClusteredQueryInvoker.java:124)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:630)
at java.lang.Thread.run (Thread.java:832)
Caused by: java.lang.NullPointerException
at org.hibernate.search.query.engine.impl.LuceneHSQuery.queryResultSize (LuceneHSQuery.java:239)
at org.infinispan.query.clustered.commandworkers.CQCreateEagerQuery.perform (CQCreateEagerQuery.java:27)
at org.infinispan.query.clustered.commandworkers.CQCommandType.perform (CQCommandType.java:43)
at org.infinispan.query.clustered.ClusteredQueryOperation.perform (ClusteredQueryOperation.java:74)
at org.infinispan.query.clustered.SegmentsClusteredQueryCommand.perform (SegmentsClusteredQueryCommand.java:45)
at org.infinispan.query.clustered.ClusteredQueryInvoker.lambda$localInvoke$4 (ClusteredQueryInvoker.java:122)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:630)
at java.lang.Thread.run (Thread.java:832)
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-11005) HotRod decoder small performance improvements
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-11005?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes updated ISPN-11005:
-------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> HotRod decoder small performance improvements
> ---------------------------------------------
>
> Key: ISPN-11005
> URL: https://issues.redhat.com/browse/ISPN-11005
> Project: Infinispan
> Issue Type: Enhancement
> Components: Server
> Affects Versions: 10.1.0.Beta1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Minor
> Labels: performace
>
> I noticed some small inefficiencies in the flight recordings from the client-server dist read benchmarks:
> * {{Intrinsics.string()}} allocates a temporary {{byte[]}}, we could use {{ByteBuf.toString(start, length, Charset)}} instead (which reuses a thread-local buffer).
> * For reading the cache name it would be even better to use {{ByteString}} and avoid the UTF8 decoding.
> * {{MediaType.hashCode()}} allocates an iterator for the params map even though it's empty.
> * {{JBossMarshallingTranscoder.transcode()}} is called twice for each requests, and even when there is no transcoding to perform it does a lot of {{String.equals()}} checks.
> * {{CacheImpl.getCacheEntryAsync()}} allocates a new {{CompletableFuture}} via {{applyThen()}} just to change the return type, could do the same thing by casting to the erased type.
> * {{EncoderCache.getCacheEntryAsync()}} could also avoid allocating a {{CompletableFuture}} when the read was synchronous.
> * {{Encoder2x}} is stateless, and yet a new instance is created for each request.
> * {{Encoder2x.writeHeader()}} looks up the cache info a second time, as most requests needed that info to execute the operation, plus one useless (I think) {{String.equals()}} check for the counter cache.
> There are also a few issues with the benchmark itself:
> * The load stage took less than 3 mins according to the logs, but flight recordings show {{PutKeyValueCommand}}s being executed at least 1 minute after the end of the load phase.
> * Either RadarGun or FlightRecorder itself is doing lots of JMX calls that throw exceptions constantly through the benchmark, allocating lots of {{StackTraceElement}} instances.
> * Finally, the cluster is unstable, and some nodes are excluded even though the network seems to be fine and GC pauses are quite small.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-12280) Failfast if lsof is not present in unix
by Dan Berindei (Jira)
[ https://issues.redhat.com/browse/ISPN-12280?page=com.atlassian.jira.plugi... ]
Dan Berindei commented on ISPN-12280:
-------------------------------------
Note: {{lsof}} was never meant to be required. {{infinispan-server.xml}} has multiple ways to check if a server is running: {{lsof}}, {{ps}}, and {{jps}}. The problem is that the {{ps}} and {{jps}} tests are broken since ServerNG landed, and now the tests rely only on {{lsof}}.
> Failfast if lsof is not present in unix
> ---------------------------------------
>
> Key: ISPN-12280
> URL: https://issues.redhat.com/browse/ISPN-12280
> Project: Infinispan
> Issue Type: Enhancement
> Components: Test Suite
> Affects Versions: 12.0.0.Dev02
> Reporter: Diego Lovison
> Assignee: Diego Lovison
> Priority: Major
> Fix For: 12.0.0.Dev03
>
>
> Some tests require lsof be present in order to work properly
> Example:
> {noformat}
> 13:24:51.246 [INFO] Infinispan JCACHE (JSR-107) TCK Runner Remote ...... SUCCESS [05:58 min]
> 13:24:51.246 [INFO] Server Integration ................................. SUCCESS [ 11.991 s]
> 13:24:51.246 [INFO] Integration tests - WildFly Module Integration Tests SUCCESS [ 58.984 s]
> {noformat}
> when not present
> {noformat}
> [ERROR] Errors:
> [ERROR] BaseHotRodQueryIT.testRemoteQuery ? HotRodClient org.infinispan.server.hotrod....
> [ERROR] BaseHotRodQueryIT.testUninverting ? HotRodClient org.infinispan.server.hotrod....
> [ERROR] HotRodClientIT.testCacheManager ? HotRodClient org.infinispan.server.hotrod.Ca...
> [ERROR] HotRodQueryIT.testRemoteQuery ? HotRodClient org.infinispan.server.hotrod.Cach...
> [ERROR] HotRodQueryIT.testUninverting ? HotRodClient org.infinispan.server.hotrod.Cach...
> [ERROR] InfinispanRemoteWithQueryIT.testRemoteQuery ? HotRodClient org.infinispan.serv...
> [ERROR] InfinispanRemoteWithQueryIT.testUninverting ? HotRodClient org.infinispan.serv...
> {noformat}
> It will take times to find out that the root cause is because lsof is missing
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (ISPN-12310) Describe the protobuf error message
by Katia Aresti (Jira)
[ https://issues.redhat.com/browse/ISPN-12310?page=com.atlassian.jira.plugi... ]
Katia Aresti updated ISPN-12310:
--------------------------------
Description:
Create a protobuf with
{code:java}
package book_sample;
message Book {
optional string title = 1;
optional string description = 2;
optional int publicationYear = 3;
}{code}
It will show: *Schema book.proto has errors*
If you inspect the response you will see: *cause: "Failed to resolve type of field "book_sample.Book.publicationYear". Type not found : int"*
It is better to show what is the error
was:see jdg desc
> Describe the protobuf error message
> -----------------------------------
>
> Key: ISPN-12310
> URL: https://issues.redhat.com/browse/ISPN-12310
> Project: Infinispan
> Issue Type: Feature Request
> Components: Console
> Reporter: Katia Aresti
> Assignee: Katia Aresti
> Priority: Major
>
> Create a protobuf with
>
> {code:java}
> package book_sample;
> message Book {
> optional string title = 1;
> optional string description = 2;
> optional int publicationYear = 3;
> }{code}
> It will show: *Schema book.proto has errors*
>
> If you inspect the response you will see: *cause: "Failed to resolve type of field "book_sample.Book.publicationYear". Type not found : int"*
>
> It is better to show what is the error
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years