[JBoss JIRA] (ISPN-6043) TransactionTable should ignore view changes during shutdown
by Dan Berindei (JIRA)
Dan Berindei created ISPN-6043:
----------------------------------
Summary: TransactionTable should ignore view changes during shutdown
Key: ISPN-6043
URL: https://issues.jboss.org/browse/ISPN-6043
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.1.0.Final
Reporter: Dan Berindei
Fix For: 8.2.0.Alpha1
During shutdown, {{TransactionTable}} unregisters itself as a view change listener, but it can still receive view change notifications after it stopped the executor service. When that happens, it causes a {{RejectedExecutionException}} that is eventually logged by JGroups:
{noformat}
pbcast.GMS - JGRP000027: failed passing message up
java.lang.RuntimeException: org.infinispan.commons.CacheListenerException: ISPN000280: Caught exception [java.util.concurrent.RejectedExecutionException] while invoking method [public void org.infinispan.transaction.TransactionTable.onViewChange(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent)] on listener instance: org.infinispan.transaction.TransactionTable@3d5ab0ba
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:682)
at org.jgroups.JChannel.up(JChannel.java:733)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1029)
at org.jgroups.protocols.RSVP.up(RSVP.java:201)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:165)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:394)
at org.jgroups.protocols.pbcast.GMS.installView(GMS.java:732)
at org.jgroups.protocols.pbcast.ParticipantGmsImpl.handleViewChange(ParticipantGmsImpl.java:146)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:922)
at org.jgroups.stack.Protocol.up(Protocol.java:412)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:294)
at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:474)
at org.jgroups.protocols.pbcast.NAKACK2.deliverBatch(NAKACK2.java:982)
at org.jgroups.protocols.pbcast.NAKACK2.removeAndPassUp(NAKACK2.java:912)
at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:846)
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:618)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:155)
at org.jgroups.protocols.FD.up(FD.java:255)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:297)
at org.jgroups.protocols.MERGE3.up(MERGE3.java:288)
at org.jgroups.protocols.Discovery.up(Discovery.java:291)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1572)
at org.jgroups.protocols.TP$MyHandler.run(TP.java:1791)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.infinispan.commons.CacheListenerException: ISPN000280: Caught exception [java.util.concurrent.RejectedExecutionException] while invoking method [public void org.infinispan.transaction.TransactionTable.onViewChange(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent)] on listener instance: org.infinispan.transaction.TransactionTable@3d5ab0ba
at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:287)
at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:22)
at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocationImpl.invoke(AbstractListenerImpl.java:305)
at org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifierImpl.notifyViewChange(CacheManagerNotifierImpl.java:88)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport$NotifyViewChange.emitNotification(JGroupsTransport.java:638)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.viewAccepted(JGroupsTransport.java:708)
at org.jgroups.blocks.MessageDispatcher.handleUpEvent(MessageDispatcher.java:602)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:679)
... 25 more
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@1f5986a3 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@2e964769[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1696]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:325)
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:546)
at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:646)
at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:641)
at org.infinispan.transaction.TransactionTable.onViewChange(TransactionTable.java:491)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocationImpl$1.run(AbstractListenerImpl.java:282)
... 32 more
{noformat}
The exception is harmless for the stopping cache, the problem is that the following view change listeners are also skipped. We should fix both {{TransactionTable}} to avoid throwing the exception, and {{CacheManagerNotifier}} to ignore any exceptions during view changes.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (ISPN-6042) NPE when using avg on repeated property and one group does not contain any value
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-6042?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-6042:
-----------------------------------------------
Adrian Nistor <anistor(a)redhat.com> changed the Status of [bug 1295516|https://bugzilla.redhat.com/show_bug.cgi?id=1295516] from NEW to POST
> NPE when using avg on repeated property and one group does not contain any value
> --------------------------------------------------------------------------------
>
> Key: ISPN-6042
> URL: https://issues.jboss.org/browse/ISPN-6042
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.1.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 8.2.0.Alpha1, 8.1.1.Final
>
>
> Adding this test to QueryDslConditionsTest results in NPE:
> {code}
> public void testEmbeddedAvg() {
> QueryFactory qf = getQueryFactory();
> Query q = qf.from(getModelFactory().getUserImplClass())
> .select(Expression.property("surname"), Expression.avg("addresses.number"))
> .groupBy("surname")
> .orderBy("surname")
> .build();
> List<Object[]> list = q.list();
> assertEquals(3, list.size());
> assertEquals(2, list.get(0).length);
> assertEquals(2, list.get(1).length);
> assertEquals(2, list.get(2).length);
> assertEquals(156d, (Double) list.get(0)[1], 0.0001d);
> assertEquals(150d, (Double) list.get(1)[1], 0.0001d);
> assertEquals(null, list.get(2)[1]);
> }
> {code}
> {code}
> java.lang.NullPointerException
> at org.infinispan.objectfilter.impl.aggregation.AvgAccumulator.merge(AvgAccumulator.java:39)
> at org.infinispan.objectfilter.impl.aggregation.FieldAccumulator.merge(FieldAccumulator.java:42)
> at org.infinispan.objectfilter.impl.aggregation.Grouper.addRow(Grouper.java:133)
> at org.infinispan.query.dsl.embedded.impl.AggregatingQuery.getBaseIterator(AggregatingQuery.java:52)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.<init>(HybridQuery.java:47)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery.getIterator(HybridQuery.java:45)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.listInternal(BaseEmbeddedQuery.java:65)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.list(BaseEmbeddedQuery.java:57)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.infinispan.query.dsl.embedded.QueryDslConditionsTest.testEmbeddedAvg(QueryDslConditionsTest.java:2066)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (ISPN-6042) NPE when using avg on repeated property and one group does not contain any value
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-6042?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-6042:
------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1295516
Bugzilla Update: Perform
> NPE when using avg on repeated property and one group does not contain any value
> --------------------------------------------------------------------------------
>
> Key: ISPN-6042
> URL: https://issues.jboss.org/browse/ISPN-6042
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.1.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 8.2.0.Alpha1, 8.1.1.Final
>
>
> Adding this test to QueryDslConditionsTest results in NPE:
> {code}
> public void testEmbeddedAvg() {
> QueryFactory qf = getQueryFactory();
> Query q = qf.from(getModelFactory().getUserImplClass())
> .select(Expression.property("surname"), Expression.avg("addresses.number"))
> .groupBy("surname")
> .orderBy("surname")
> .build();
> List<Object[]> list = q.list();
> assertEquals(3, list.size());
> assertEquals(2, list.get(0).length);
> assertEquals(2, list.get(1).length);
> assertEquals(2, list.get(2).length);
> assertEquals(156d, (Double) list.get(0)[1], 0.0001d);
> assertEquals(150d, (Double) list.get(1)[1], 0.0001d);
> assertEquals(null, list.get(2)[1]);
> }
> {code}
> {code}
> java.lang.NullPointerException
> at org.infinispan.objectfilter.impl.aggregation.AvgAccumulator.merge(AvgAccumulator.java:39)
> at org.infinispan.objectfilter.impl.aggregation.FieldAccumulator.merge(FieldAccumulator.java:42)
> at org.infinispan.objectfilter.impl.aggregation.Grouper.addRow(Grouper.java:133)
> at org.infinispan.query.dsl.embedded.impl.AggregatingQuery.getBaseIterator(AggregatingQuery.java:52)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery$1.<init>(HybridQuery.java:47)
> at org.infinispan.query.dsl.embedded.impl.HybridQuery.getIterator(HybridQuery.java:45)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.listInternal(BaseEmbeddedQuery.java:65)
> at org.infinispan.query.dsl.embedded.impl.BaseEmbeddedQuery.list(BaseEmbeddedQuery.java:57)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.infinispan.query.dsl.embedded.QueryDslConditionsTest.testEmbeddedAvg(QueryDslConditionsTest.java:2066)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (ISPN-5787) Issues with aggregation queries using Date objects
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5787?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5787:
--------------------------------
Git Pull Request: https://github.com/infinispan/infinispan/pull/3739, https://github.com/infinispan/infinispan/pull/3919 (was: https://github.com/infinispan/infinispan/pull/3739)
> Issues with aggregation queries using Date objects
> --------------------------------------------------
>
> Key: ISPN-5787
> URL: https://issues.jboss.org/browse/ISPN-5787
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 8.0.1.Final, 8.1.0.Alpha1
> Reporter: Jakub Markos
> Assignee: Adrian Nistor
> Fix For: 8.1.0.Alpha2, 8.0.2.Final
>
>
> I found 2 problems, not sure if they have a common cause:
> 1.
> This query
> {code}
> Query q = qf.from(getModelFactory().getTransactionImplClass())
> .select("date")
> .having("date").between(makeDate("2013-02-15"), makeDate("2013-03-15")).toBuilder()
> .groupBy("date")
> .build();
> List<Object[]> list = q.list();
> {code}
> fails with
> {code}
> org.hibernate.hql.ParsingException: HQL000002: The query SELECT _gen0.date FROM org.infinispan.query.dsl.embedded.testdomain.hsearch.TransactionHS _gen0 WHERE (date >= Fri Feb 15 01:00:00 CET 2013) AND (date <= Fri Mar 15 01:00:00 CET 2013) is not valid; Parser error messages: [[statement, statementElement, selectStatement, queryExpression, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, concatenation, additiveExpression, multiplyExpression, unaryExpression, atom]: line 1:116 mismatched token: [@35,116:118='Feb',<75>,1:116]; expecting type RIGHT_PAREN].
> {code}
> The query works after removing the groupBy. It also partially works in remote mode (running in RemoteQueryDslConditionsTest) - the query is parsed, but still doesn't return the result as a Date object.
> 2.
> This query
> {code}
> Query q = qf.from(getModelFactory().getTransactionImplClass())
> .select(Expression.count("date"), Expression.min("date"))
> .having("description").eq("Hotel").toBuilder()
> .groupBy("id")
> .build();
> List<Object[]> list = q.list();
> {code}
> returns in the 2nd column the internal representation of the Date (i.e. 20130227000000000) instead of an object. Selecting only the minimum, select(Expression.min("date")), the query returns a Date object.
> Both queries are supposed to be run inside the QueryDslConditionsTest test class.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months
[JBoss JIRA] (ISPN-5044) Intermittent test failure: ClusterTopologyManagerTest.testClusterRecoveryAfterSplitAndCoordLeave
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5044?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5044:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
> Intermittent test failure: ClusterTopologyManagerTest.testClusterRecoveryAfterSplitAndCoordLeave
> ------------------------------------------------------------------------------------------------
>
> Key: ISPN-5044
> URL: https://issues.jboss.org/browse/ISPN-5044
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Core
> Affects Versions: 7.1.0.Alpha1
> Reporter: Sanne Grinovero
> Assignee: Dan Berindei
> Priority: Blocker
> Fix For: 8.2.0.Alpha1
>
>
> {noformat}~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
> jgroups.bind_addr = 127.0.0.1
> java.runtime.version = 1.7.0_71-mockbuild_2014_10_03_09_36-b00
> java.runtime.name =OpenJDK Runtime Environment
> java.vm.version = 24.65-b04
> java.vm.vendor = Oracle Corporation
> os.name = Linux
> os.version = 3.10.0-123.9.3.el7.x86_64
> sun.arch.data.model = 64
> sun.cpu.endian = little
> protocol.stack = null
> infinispan.test.jgroups.protocol = tcp
> infinispan.unsafe.allow_jdk8_chm = true
> java.net.preferIPv4Stack = true
> java.net.preferIPv6Stack = null
> log4.configuration = file:/opt/infinispan-log4j.xml
> MAVEN_OPTS = null
> ~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
> Tests run: 5625, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 546.54 sec <<< FAILURE! - in TestSuite
> testClusterRecoveryAfterSplitAndCoordLeave(org.infinispan.statetransfer.ClusterTopologyManagerTest) Time elapsed: 0.3 sec <<< FAILURE!
> org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete() throws java.lang.InterruptedException on object of type StateTransferManagerImpl
> at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
> at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869)
> at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638)
> at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627)
> at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530)
> at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:217)
> at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:813)
> at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:584)
> at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:539)
> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:416)
> at org.infinispan.test.MultipleCacheManagersTest.cache(MultipleCacheManagersTest.java:365)
> at org.infinispan.statetransfer.ClusterTopologyManagerTest.testClusterRecoveryAfterSplitAndCoordLeave(ClusterTopologyManagerTest.java:208)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.infinispan.commons.CacheException: Initial state transfer timed out for cache testCache on ClusterTopologyManagerTest-NodeN-5046
> at org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete(StateTransferManagerImpl.java:218)
> at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
> ... 31 more
> Results :
> Failed tests:
> ClusterTopologyManagerTest.testClusterRecoveryAfterSplitAndCoordLeave:208->MultipleCacheManagersTest.cache:365 » Cache
> Tests run: 5625, Failures: 1, Errors: 0, Skipped: 0
> {noformat}
> Also the execution of ClusterTopologyManagerTest is extremely slow, it takes more than 2 minutes here. Is that really necessary?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 3 months