Upgrade Infinispan to 12.1.7.Final

This commit is contained in:
Martin Kanis 2021-12-23 14:18:37 +01:00 committed by Hynek Mlnařík
parent d9d77fe1f7
commit 9d5355b7ad
2 changed files with 12 additions and 2 deletions

View file

@ -384,6 +384,10 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
String jdgServer = config.get("remoteStoreHost", "localhost"); String jdgServer = config.get("remoteStoreHost", "localhost");
Integer jdgPort = config.getInt("remoteStorePort", 11222); Integer jdgPort = config.getInt("remoteStorePort", 11222);
// After upgrade to Infinispan 12.1.7.Final it's required that both remote store and embedded cache use
// the same key media type to allow segmentation. Also, the number of segments in an embedded cache needs to match number of segments in the remote store.
boolean segmented = config.getBoolean("segmented", false);
builder.persistence() builder.persistence()
.passivation(false) .passivation(false)
.addStore(RemoteStoreConfigurationBuilder.class) .addStore(RemoteStoreConfigurationBuilder.class)
@ -393,6 +397,7 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
.preload(false) .preload(false)
.shared(true) .shared(true)
.remoteCacheName(cacheName) .remoteCacheName(cacheName)
.segmented(segmented)
.rawValues(true) .rawValues(true)
.forceReturnValues(false) .forceReturnValues(false)
.marshaller(KeycloakHotRodMarshallerFactory.class.getName()) .marshaller(KeycloakHotRodMarshallerFactory.class.getName())
@ -408,6 +413,10 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
String jdgServer = config.get("remoteStoreHost", "localhost"); String jdgServer = config.get("remoteStoreHost", "localhost");
Integer jdgPort = config.getInt("remoteStorePort", 11222); Integer jdgPort = config.getInt("remoteStorePort", 11222);
// After upgrade to Infinispan 12.1.7.Final it's required that both remote store and embedded cache use
// the same key media type to allow segmentation. Also, the number of segments in an embedded cache needs to match number of segments in the remote store.
boolean segmented = config.getBoolean("segmented", false);
builder.persistence() builder.persistence()
.passivation(false) .passivation(false)
.addStore(RemoteStoreConfigurationBuilder.class) .addStore(RemoteStoreConfigurationBuilder.class)
@ -417,6 +426,7 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
.preload(true) .preload(true)
.shared(true) .shared(true)
.remoteCacheName(InfinispanConnectionProvider.ACTION_TOKEN_CACHE) .remoteCacheName(InfinispanConnectionProvider.ACTION_TOKEN_CACHE)
.segmented(segmented)
.rawValues(true) .rawValues(true)
.forceReturnValues(false) .forceReturnValues(false)
.marshaller(KeycloakHotRodMarshallerFactory.class.getName()) .marshaller(KeycloakHotRodMarshallerFactory.class.getName())

View file

@ -78,8 +78,8 @@
<jakarta.persistence.version>2.2.3</jakarta.persistence.version> <jakarta.persistence.version>2.2.3</jakarta.persistence.version>
<hibernate.core.version>5.3.20.Final</hibernate.core.version> <hibernate.core.version>5.3.20.Final</hibernate.core.version>
<hibernate.c3p0.version>5.3.20.Final</hibernate.c3p0.version> <hibernate.c3p0.version>5.3.20.Final</hibernate.c3p0.version>
<infinispan.version>11.0.9.Final</infinispan.version> <infinispan.version>12.1.7.Final</infinispan.version>
<infinispan.protostream.processor.version>4.3.4.Final</infinispan.protostream.processor.version> <infinispan.protostream.processor.version>4.4.1.Final</infinispan.protostream.processor.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version> <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<jackson.version>2.12.1</jackson.version> <jackson.version>2.12.1</jackson.version>
<jackson.databind.version>${jackson.version}</jackson.databind.version> <jackson.databind.version>${jackson.version}</jackson.databind.version>