Git Product home page Git Product logo

infinispan-app's Introduction

IPROTO-219

This is a sample spring boot application which demonstrates a bug in Infinispan when unmarshalling Protostream collections when using clustered caches.

https://issues.redhat.com/projects/IPROTO/issues/IPROTO-219?filter=allopenissues

The application contains a rest endpoint that generates 100k Moudule elements in an ArrayList. The Module class has fields annotated with @ProtoField. The controller method is annotated with Spring @Cacheable, so after the first invocation of the controller endpoint the cache should be populated.

Infinispan is deployed in embedded mode and is configured to use TCPPING.

The docker-compose file in the repository will build the application and launch 2 application nodes running on ports 9001 and 9002, a gossip server is also launched to use for discovery.

Usage:

mvn clean package

docker-compose build

docker-compose up

If all is successful two nodes will be running with a replicated cache

The first call to either node should succeed - data being added to the cache will succeed:

curl http://localhost:9001/modules

The bug manifests as an exception when unmarshalling the data on a read from the cache. This can be triggered by making a subsequent call to either node. curl http://localhost:9002/modules

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.infinispan.commons.dataconversion.EncodingException: ISPN000495: ProtostreamTranscoder encountered error transcoding content] with root cause
node1_1   | 
node1_1   | java.io.IOException: Invalid WrappedMessage encoding.
node1_1   |     at org.infinispan.protostream.WrappedMessage.readMessage(WrappedMessage.java:529) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.protostream.WrappedMessage.readContainer(WrappedMessage.java:616) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.protostream.WrappedMessage.readMessage(WrappedMessage.java:373) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.protostream.WrappedMessage.read(WrappedMessage.java:351) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.protostream.ProtobufUtil.fromWrappedByteArray(ProtobufUtil.java:129) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.protostream.ProtobufUtil.fromWrappedByteArray(ProtobufUtil.java:125) ~[protostream-4.4.1.Final.jar!/:4.4.1.Final]
node1_1   |     at org.infinispan.encoding.ProtostreamTranscoder.unmarshallCascading(ProtostreamTranscoder.java:149) ~[infinispan-core-12.1.7.Final.jar!/:12.1.7.Final]
node1_1   |     at org.infinispan.encoding.ProtostreamTranscoder.unmarshall(ProtostreamTranscoder.java:136) ~[infinispan-core-12.1.7.Final.jar!/:12.1.7.Final]
node1_1   |     at org.infinispan.encoding.ProtostreamTranscoder.transcode(ProtostreamTranscoder.java:99) ~[infinispan-core-12.1.7.Final.jar!/:12.1.7.Final]

infinispan-app's People

Contributors

tjayr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.