[JBoss JIRA] (ISPN-9443) Fail when single region is accessed with multiple strategies
by Diego Lovison (JIRA)
[ https://issues.jboss.org/browse/ISPN-9443?page=com.atlassian.jira.plugin.... ]
Diego Lovison edited comment on ISPN-9443 at 8/22/18 7:36 AM:
--------------------------------------------------------------
If this is the case, then we have a different issue.
The following example is working:
{code:java}
AtomicLong p1Id = new AtomicLong(0L);
doWork(factory, (session) -> {
Person p1 = new Person("p-name", "p-code", Arrays.asList(new Phone("pp-1"), new Phone("pp-2")));
session.persist(p1);
p1Id.set(p1.getId());
});
doWork(factory, (session) -> {
session.find(Person.class, p1Id.get()).getPhones().add(new Phone("pp-3"));
});
doWork(factory, (session) -> {
Assert.assertEquals(3, session.find(Person.class, p1Id.get()).getPhones().size());
});
{code}
SQL:
{noformat}
Hibernate: insert into phone (mobile, id) values (?, ?)
Hibernate: update person set name=?, version=? where id=? and version=?
Hibernate: delete from person_phone where Person_id=?
Hibernate: insert into person_phone (Person_id, phones_id) values (?, ?)
Hibernate: insert into person_phone (Person_id, phones_id) values (?, ?)
Hibernate: insert into person_phone (Person_id, phones_id) values (?, ?)
{noformat}
was (Author: dlovison):
If this is the case, then we have a different issue.
The following example is working:
{code:java}
AtomicLong p1Id = new AtomicLong(0L);
doWork(factory, (session) -> {
Person p1 = new Person("p-name", "p-code", Arrays.asList(new Phone("pp-1"), new Phone("pp-2")));
session.persist(p1);
p1Id.set(p1.getId());
});
doWork(factory, (session) -> {
session.find(Person.class, p1Id.get()).getPhones().add(new Phone("pp-3"));
});
doWork(factory, (session) -> {
Assert.assertEquals(3, session.find(Person.class, p1Id.get()).getPhones().size());
});
{code}
> Fail when single region is accessed with multiple strategies
> ------------------------------------------------------------
>
> Key: ISPN-9443
> URL: https://issues.jboss.org/browse/ISPN-9443
> Project: Infinispan
> Issue Type: Enhancement
> Components: Hibernate Cache
> Affects Versions: 9.3.1.Final
> Reporter: Radim Vansa
> Fix For: 9.4.0.Final
>
>
> When we have two entities that share the same region but use different access strategies the Hibernate boot should fail. Right now there's an assertion in {{DomainDataRegionImpl.prepareFor*}} but this does not give much explanation and does not fail when assertions are disabled which leads to cryptic errors later on.
> Example:
> {code}
> @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "item")
> public static class NonStrictReadWriteVersionedCacheableItem { ... }
> @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "item")
> public static class ReadWriteVersionedCacheableItem { ... }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-9443) Fail when single region is accessed with multiple strategies
by Diego Lovison (JIRA)
[ https://issues.jboss.org/browse/ISPN-9443?page=com.atlassian.jira.plugin.... ]
Diego Lovison commented on ISPN-9443:
-------------------------------------
If this is the case, then we have a different issue.
The following example is working:
AtomicLong p1Id = new AtomicLong(0L);
doWork(factory, (session) -> {
Person p1 = new Person("p-name", "p-code", Arrays.asList(new Phone("pp-1"), new Phone("pp-2")));
session.persist(p1);
p1Id.set(p1.getId());
});
doWork(factory, (session) -> {
session.find(Person.class, p1Id.get()).getPhones().add(new Phone("pp-3"));
});
doWork(factory, (session) -> {
Assert.assertEquals(3, session.find(Person.class, p1Id.get()).getPhones().size());
});
> Fail when single region is accessed with multiple strategies
> ------------------------------------------------------------
>
> Key: ISPN-9443
> URL: https://issues.jboss.org/browse/ISPN-9443
> Project: Infinispan
> Issue Type: Enhancement
> Components: Hibernate Cache
> Affects Versions: 9.3.1.Final
> Reporter: Radim Vansa
> Fix For: 9.4.0.Final
>
>
> When we have two entities that share the same region but use different access strategies the Hibernate boot should fail. Right now there's an assertion in {{DomainDataRegionImpl.prepareFor*}} but this does not give much explanation and does not fail when assertions are disabled which leads to cryptic errors later on.
> Example:
> {code}
> @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "item")
> public static class NonStrictReadWriteVersionedCacheableItem { ... }
> @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "item")
> public static class ReadWriteVersionedCacheableItem { ... }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-9443) Fail when single region is accessed with multiple strategies
by Diego Lovison (JIRA)
[ https://issues.jboss.org/browse/ISPN-9443?page=com.atlassian.jira.plugin.... ]
Diego Lovison edited comment on ISPN-9443 at 8/22/18 7:16 AM:
--------------------------------------------------------------
If this is the case, then we have a different issue.
The following example is working:
{code:java}
AtomicLong p1Id = new AtomicLong(0L);
doWork(factory, (session) -> {
Person p1 = new Person("p-name", "p-code", Arrays.asList(new Phone("pp-1"), new Phone("pp-2")));
session.persist(p1);
p1Id.set(p1.getId());
});
doWork(factory, (session) -> {
session.find(Person.class, p1Id.get()).getPhones().add(new Phone("pp-3"));
});
doWork(factory, (session) -> {
Assert.assertEquals(3, session.find(Person.class, p1Id.get()).getPhones().size());
});
{code}
was (Author: dlovison):
If this is the case, then we have a different issue.
The following example is working:
AtomicLong p1Id = new AtomicLong(0L);
doWork(factory, (session) -> {
Person p1 = new Person("p-name", "p-code", Arrays.asList(new Phone("pp-1"), new Phone("pp-2")));
session.persist(p1);
p1Id.set(p1.getId());
});
doWork(factory, (session) -> {
session.find(Person.class, p1Id.get()).getPhones().add(new Phone("pp-3"));
});
doWork(factory, (session) -> {
Assert.assertEquals(3, session.find(Person.class, p1Id.get()).getPhones().size());
});
> Fail when single region is accessed with multiple strategies
> ------------------------------------------------------------
>
> Key: ISPN-9443
> URL: https://issues.jboss.org/browse/ISPN-9443
> Project: Infinispan
> Issue Type: Enhancement
> Components: Hibernate Cache
> Affects Versions: 9.3.1.Final
> Reporter: Radim Vansa
> Fix For: 9.4.0.Final
>
>
> When we have two entities that share the same region but use different access strategies the Hibernate boot should fail. Right now there's an assertion in {{DomainDataRegionImpl.prepareFor*}} but this does not give much explanation and does not fail when assertions are disabled which leads to cryptic errors later on.
> Example:
> {code}
> @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "item")
> public static class NonStrictReadWriteVersionedCacheableItem { ... }
> @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "item")
> public static class ReadWriteVersionedCacheableItem { ... }
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-9426) Distributed script execution returning null results in NullPointerException
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-9426?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-9426:
------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/6215
> Distributed script execution returning null results in NullPointerException
> ---------------------------------------------------------------------------
>
> Key: ISPN-9426
> URL: https://issues.jboss.org/browse/ISPN-9426
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.4.0.Beta1
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
> Fix For: 9.4.0.CR1
>
>
> The following script:
> {code}
> // mode=distributed,language=javascript,datatype='text/plain; charset=utf-8'
> cache.get("not-exist");
> {code}
> Results in:
> {code}
> org.infinispan.client.hotrod.exceptions.HotRodClientException:
> Request for messageId=19 returned server error (status=0x85): java.lang.NullPointerException
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:338)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:180)
> at org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:138)
> at org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:98)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
> at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> The issue happens with both latest 2.8 and older 2.5 protocol versions.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-9153) [Openshift] Integration with OCP Operator
by Pedro Zapata (JIRA)
[ https://issues.jboss.org/browse/ISPN-9153?page=com.atlassian.jira.plugin.... ]
Pedro Zapata updated ISPN-9153:
-------------------------------
Summary: [Openshift] Integration with OCP Operator (was: Integration with OCP Operator)
> [Openshift] Integration with OCP Operator
> -----------------------------------------
>
> Key: ISPN-9153
> URL: https://issues.jboss.org/browse/ISPN-9153
> Project: Infinispan
> Issue Type: Feature Request
> Components: OpenShift
> Reporter: Galder Zamarreño
> Labels: redhat-summit-18
>
> Research integration with OCP Operator Framework (the framework was developed by CoreOS Team for Tectonic and will be merged into OCP soon). The idea is to manage Application Lifecycle and automate all the hard things to do, like upgrades, handling abnormal behavior etc.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-9160) Concurrent management console access in multiple OpenShift clusters
by Pedro Zapata (JIRA)
[ https://issues.jboss.org/browse/ISPN-9160?page=com.atlassian.jira.plugin.... ]
Pedro Zapata updated ISPN-9160:
-------------------------------
Priority: Minor (was: Major)
> Concurrent management console access in multiple OpenShift clusters
> -------------------------------------------------------------------
>
> Key: ISPN-9160
> URL: https://issues.jboss.org/browse/ISPN-9160
> Project: Infinispan
> Issue Type: Enhancement
> Components: JMX, reporting and management, OpenShift
> Reporter: Galder Zamarreño
> Assignee: Vladimir Blagojevic
> Priority: Minor
> Labels: redhat-summit-18
>
> The management console, when used in conjunction with OpenShift, does not handle well opening management console windows to different OpenShift clusters. To workaround it, during the presentation, one site was queried using the console, and the same console was used to update data in that site, but when it came to checking other sites, command line was used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ISPN-7672) NonTotalOrderTxPerCacheInboundInvocationHandler throws warning when adding cache entry using Spring Session
by Pedro Zapata (JIRA)
[ https://issues.jboss.org/browse/ISPN-7672?page=com.atlassian.jira.plugin.... ]
Pedro Zapata updated ISPN-7672:
-------------------------------
Component/s: (was: Cloud)
> NonTotalOrderTxPerCacheInboundInvocationHandler throws warning when adding cache entry using Spring Session
> -----------------------------------------------------------------------------------------------------------
>
> Key: ISPN-7672
> URL: https://issues.jboss.org/browse/ISPN-7672
> Project: Infinispan
> Issue Type: Bug
> Components: Spring Integration
> Affects Versions: 9.0.0.CR4
> Reporter: Sebastian Łaskawiec
> Assignee: Pedro Ruivo
> Priority: Minor
> Fix For: 9.4.0.Final
>
>
> When I'm trying to add an entry using Spring Session integration with a [transactional cache|https://github.com/slaskawi/presentations/blob/master/2017_spring_s...], the server throws a warning:
> {code}
> [transactions-repository-1-2cbrv] 06:53:40,773 WARN [org.infinispan.remoting.inboundhandler.NonTotalOrderTxPerCacheInboundInvocationHandler] (remote-thread--p2-t18) ISPN000071: Caught exception when handling command DistributedExecuteCommand [cache=Cache 'sessions'@transactions-repository-1-2cbrv, keys=[], callable=ClusterEventCallable{identifier=b345211e-fbd7-4305-b3a6-6979301e0360, events=[ClusterEvent {type=CACHE_ENTRY_CREATED, cache=Cache 'sessions'@transactions-repository-1-2cbrv, key=[B@8c75820, value=[B@76856353, oldValue=null, transaction=RecoveryAwareGlobalTransaction{xid=< 131077, 29, 36, 0000000000-1-1-84170374-96-629488-44-62370001349, 0000000000-1-1-84170374-96-629488-44-62370001400000000 >, internalId=562954248388609} GlobalTx:transactions-repository-1-cwk6f:1, retryCommand=false, origin=transactions-repository-1-cwk6f}]}]: org.infinispan.commons.CacheListenerException: ISPN000280: Caught exception [java.lang.ClassCastException] while invoking method [public void org.infinispan.server.hotrod.ClientListenerRegistry$BaseClientEventSender.onCacheEvent(org.infinispan.notifications.cachelistener.event.CacheEntryEvent)] on listener instance: org.infinispan.server.hotrod.ClientListenerRegistry$StatelessClientEventSender@7b97a57
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:401)
> [transactions-repository-1-2cbrv] at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.invoke(AbstractListenerImpl.java:419)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1512)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1508)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invokeNoChecks(CacheNotifierImpl.java:1503)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyClusterListeners(CacheNotifierImpl.java:711)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.cluster.ClusterEventCallable.call(ClusterEventCallable.java:49)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.cachelistener.cluster.ClusterEventCallable.call(ClusterEventCallable.java:25)
> [transactions-repository-1-2cbrv] at org.infinispan.commands.read.DistributedExecuteCommand.invokeAsync(DistributedExecuteCommand.java:99)
> [transactions-repository-1-2cbrv] at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokeCommand(BasePerCacheInboundInvocationHandler.java:90)
> [transactions-repository-1-2cbrv] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.invoke(BaseBlockingRunnable.java:90)
> [transactions-repository-1-2cbrv] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.runAsync(BaseBlockingRunnable.java:68)
> [transactions-repository-1-2cbrv] at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:40)
> [transactions-repository-1-2cbrv] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [transactions-repository-1-2cbrv] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [transactions-repository-1-2cbrv] at java.lang.Thread.run(Thread.java:745)
> [transactions-repository-1-2cbrv] Caused by: java.lang.ClassCastException: org.infinispan.container.versioning.SimpleClusteredVersion cannot be cast to org.infinispan.container.versioning.NumericVersion
> [transactions-repository-1-2cbrv] at org.infinispan.server.hotrod.ClientListenerRegistry$BaseClientEventSender.onCacheEvent(ClientListenerRegistry.java:363)
> [transactions-repository-1-2cbrv] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [transactions-repository-1-2cbrv] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [transactions-repository-1-2cbrv] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [transactions-repository-1-2cbrv] at java.lang.reflect.Method.invoke(Method.java:498)
> [transactions-repository-1-2cbrv] at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:396)
> [transactions-repository-1-2cbrv] ... 16 more
> [transactions-repository-1-2cbrv]
> {code}
> This didn't happen in {{CR2}} release, so there must be something that changed since then. I also noticed that this sometimes leads to exceptions in the Hot Rod client.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months