[infinispan-issues] [JBoss JIRA] (ISPN-9031) Add CodedInputStream.setsize functionality

Adrian Nistor (JIRA) issues at jboss.org
Tue Jun 26 05:47:00 EDT 2018


     [ https://issues.jboss.org/browse/ISPN-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Nistor updated ISPN-9031:
--------------------------------
    Fix Version/s: 9.4.0.Alpha1


> Add CodedInputStream.setsize functionality
> ------------------------------------------
>
>                 Key: ISPN-9031
>                 URL: https://issues.jboss.org/browse/ISPN-9031
>             Project: Infinispan
>          Issue Type: Feature Request
>            Reporter: Lena Herrmann
>             Fix For: 9.4.0.Alpha1
>
>
> If you want to use the Protobufmarchaller for larger objects the following exception occurs: 
> {code:java}
> at org.infinispan.client.hotrod.marshall.MarshallerUtil.bytes2obj(MarshallerUtil.java:49)
>     at org.infinispan.client.hotrod.impl.protocol.CodecUtils.readUnmarshallByteArray(CodecUtils.java:38)
>     at org.infinispan.client.hotrod.impl.protocol.Codec20.readUnmarshallByteArray(Codec20.java:54)
>     at org.infinispan.client.hotrod.impl.operations.GetOperation.executeOperation(GetOperation.java:36)
>     at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
>     at org.infinispan.client.hotrod.impl.RemoteCacheImpl.get(RemoteCacheImpl.java:367)
>     at com.channelpilot.api.tabledata.RemoteCacheConnector.get(RemoteCacheConnector.java:49)
>     at com.channelpilot.api.tabledata.TableDataService.get(TableDataService.java:91)
>     at com.channelpilot.api.tabledata.build.ControlDataBuilder.build(ControlDataBuilder.java:48)
>     at com.channelpilot.api.frontend.jobs.threads.BuildTableDataJob.execute(BuildTableDataJob.java:72)
>     at com.channelpilot.api.frontend.jobs.threads.BuildTableDataJob.execute(BuildTableDataJob.java:31)
>     at com.channelpilot.utils.concurrent.CPCallable.call(CPCallable.java:105)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message was too large.  May be malicious.  Use CodedInputStream.setSizeLimit() to increase the size limit.
>     at protostream.com.google.protobuf.InvalidProtocolBufferException.sizeLimitExceeded(InvalidProtocolBufferException.java:122)
>     at protostream.com.google.protobuf.CodedInputStream.readRawBytesSlowPath(CodedInputStream.java:1166)
>     at protostream.com.google.protobuf.CodedInputStream.readByteArray(CodedInputStream.java:535)
>     at org.infinispan.protostream.impl.RawProtoStreamReaderImpl.readByteArray(RawProtoStreamReaderImpl.java:105)
>     at org.infinispan.protostream.WrappedMessage.readMessage(WrappedMessage.java:232)
>     at org.infinispan.protostream.ProtobufUtil.fromWrappedByteArray(ProtobufUtil.java:122)
>     at org.infinispan.query.remote.client.BaseProtoStreamMarshaller.objectFromByteBuffer(BaseProtoStreamMarshaller.java:32)
>     at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
>     at org.infinispan.client.hotrod.marshall.MarshallerUtil.bytes2obj(MarshallerUtil.java:33)
> {code}
> According to the official protobuf-documentation one should increase the size-limit, if this exception is thrown. Within infinispan there is no possibility to change this size in some way. 
> Adding the to for example a configurationbuilder or similar, would be a good improvement.  



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list