Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Infinispan to 10.0.0.Final #5295

Merged
merged 1 commit into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<testng.version>6.14.2</testng.version>
<assertj.version>3.13.2</assertj.version>
<json-smart.version>2.3</json-smart.version>
<infinispan.version>10.0.0.CR1</infinispan.version>
<infinispan.protostream.version>4.3.0.Alpha10</infinispan.protostream.version>
<infinispan.version>10.0.0.Final</infinispan.version>
<infinispan.protostream.version>4.3.0.Final</infinispan.protostream.version>
<caffeine.version>2.6.2</caffeine.version>
<netty.version>4.1.42.Final</netty.version>
<reactive-streams.version>1.0.3</reactive-streams.version>
Expand Down
4 changes: 2 additions & 2 deletions extensions/infinispan-client/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<artifactId>infinispan-client-hotrod</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-osgi</artifactId>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jboss-marshalling</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.transaction</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.infinispan.client.runtime;

import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.util.Map;
Expand All @@ -26,16 +25,15 @@
import org.infinispan.client.hotrod.logging.Log;
import org.infinispan.client.hotrod.logging.LogFactory;
import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller;
import org.infinispan.commons.CacheConfigurationException;
import org.infinispan.commons.marshall.Marshaller;
import org.infinispan.commons.util.Util;
import org.infinispan.counter.api.CounterManager;
import org.infinispan.protostream.BaseMarshaller;
import org.infinispan.protostream.FileDescriptorSource;
import org.infinispan.protostream.SerializationContext;
import org.infinispan.protostream.SerializationContextInitializer;
import org.infinispan.protostream.WrappedMessage;
import org.infinispan.query.remote.client.ProtobufMetadataManagerConstants;
import org.infinispan.query.remote.client.impl.MarshallerRegistration;

/**
* Produces a configured remote cache manager instance
Expand Down Expand Up @@ -129,10 +127,10 @@ public static void handleProtoStreamRequirements(Properties properties) {
// Note that the other half is done in QuerySubstitutions.SubstituteMarshallerRegistration class
// Note that the registration of these files are done twice in normal VM mode
// (once during init and once at runtime)
properties.put(InfinispanClientProducer.PROTOBUF_FILE_PREFIX + MarshallerRegistration.QUERY_PROTO_RES,
getContents(MarshallerRegistration.QUERY_PROTO_RES));
properties.put(InfinispanClientProducer.PROTOBUF_FILE_PREFIX + MarshallerRegistration.MESSAGE_PROTO_RES,
getContents(MarshallerRegistration.MESSAGE_PROTO_RES));
properties.put(InfinispanClientProducer.PROTOBUF_FILE_PREFIX + WrappedMessage.PROTO_FILE,
getContents("/" + WrappedMessage.PROTO_FILE));
String queryProtoFile = "org/infinispan/query/remote/client/query.proto";
properties.put(InfinispanClientProducer.PROTOBUF_FILE_PREFIX + queryProtoFile, getContents("/" + queryProtoFile));
}

/**
Expand Down Expand Up @@ -206,11 +204,7 @@ private static void handleProtoStreamMarshaller(ProtoStreamMarshaller marshaller
.get(InfinispanClientProducer.PROTOBUF_INITIALIZERS);
if (initializers != null) {
initializers.forEach(sci -> {
try {
sci.registerSchema(serializationContext);
} catch (IOException e) {
throw new CacheConfigurationException(e);
}
sci.registerSchema(serializationContext);
sci.registerMarshallers(serializationContext);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ final class SubstituteMarshallerRegistration {
public static void init(SerializationContext ctx) throws IOException {
// Skip loading the proto definition files as this was already done at compile time with
// HandleProtostreamMarshaller#handleQueryRequirements
MarshallerRegistration.registerMarshallers(ctx);
MarshallerRegistration.INSTANCE.registerMarshallers(ctx);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import org.infinispan.configuration.parsing.ConfigurationParser;
import org.infinispan.distribution.ch.ConsistentHashFactory;
import org.infinispan.distribution.ch.impl.HashFunctionPartitioner;
import org.infinispan.factories.impl.ModuleMetadataBuilder;
import org.infinispan.interceptors.AsyncInterceptor;
import org.infinispan.marshall.exts.CollectionExternalizer;
import org.infinispan.marshall.exts.MapExternalizer;
import org.infinispan.modules.ModuleMetadataBuilder;
import org.infinispan.notifications.Listener;
import org.infinispan.persistence.spi.CacheLoader;
import org.infinispan.persistence.spi.CacheWriter;
Expand Down Expand Up @@ -86,6 +86,7 @@ void setup(BuildProducer<FeatureBuildItem> feature, BuildProducer<ReflectiveClas
"org/infinispan/protostream/message-wrapping.proto",
"proto/generated/persistence.commons.proto",
"proto/generated/persistence.core.proto",
"proto/generated/global.commons.proto",
"default-configs/default-jgroups-udp.xml",
"default-configs/default-jgroups-tcp.xml",
"default-configs/default-jgroups-kubernetes.xml",
Expand Down
21 changes: 13 additions & 8 deletions extensions/infinispan-embedded/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<artifactId>quarkus-infinispan-embedded</artifactId>
<name>Quarkus - Infinispan - Embedded - Runtime</name>
<description>Run an embedded Infinispan data grid server for distributed caching</description>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit late to the party but isn't this going to be a problem with code.quarkus.io once we make this extension public? @maxandersen am I right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no plan to make this public. It's more likely that we'll move it to a separate repository.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the problem you for see @gsmet ? I feel like i'm missing some context ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I am not sure why this line was removed. I am more than fine adding it back in if it fixes something :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh - now i get it. yes you'll want to make sure you have a description either here or in quarkus-extension.yaml as otherwise it will show up blank on code.quarkus


<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand All @@ -26,22 +26,27 @@
<artifactId>quarkus-caffeine</artifactId>
</dependency>

<!-- Explicitly add in smallrye-metrics so that the proper version of
microprofile-metrics-api is brought along since it is excluded below
This and the exclusion can be removed when updating to 10.0.1.Final of Infinispan -->
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-metrics</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.eclipse.microprofile.metrics</groupId>
<artifactId>microprofile-metrics-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>
jboss-transaction-api_1.2_spec
</artifactId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
Expand Down
22 changes: 22 additions & 0 deletions integration-tests/infinispan-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-serialization-avro</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
Expand All @@ -76,6 +80,24 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>

<!-- We override these to satisfy Infinispan server -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that it won't work with 2.9.10.20191020? IMHO the BOM should be updated to Jackson 2.10.0 first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that Infinispan Server uses a new version of Jackson that isn't compatible with the version Quarkus is currently using. The Server is only started to test the client, so this doesn't affect any Quarkus code.

Copy link
Contributor

@gastaldi gastaldi Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But doesn't that mean that in these tests the client will use Jackson 2.10.0 too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests don't use anything that requires Jackson to be loaded afaik.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least it doesn't fail 🤷‍♂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, is the Infinispan client using Jackson at all? I guess if it's only used in the server, then it's ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Infinispan Client does not use Jackson at all, it is all hotrod. I am only overriding the Jackson version for the Infinispan Server (which does use Jackson for REST), so that the client can actually talk to something.

I was referring to whether or not the Quarkus web layer used Jackson, maybe it only uses it for non String types? All my return types are String in the test.

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.0</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
</local-cache>
<local-cache name="off-heap-memory">
<memory>
<off-heap size="10000000" eviction="MEMORY" address-count="4"/>
<off-heap size="10000000" eviction="MEMORY"/>
</memory>
</local-cache>
<local-cache name="binary-memory">
Expand Down