[ 
https://issues.apache.org/jira/browse/IGNITE-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Paschenko reassigned IGNITE-4342:
-------------------------------------------

    Assignee: Alexander Paschenko

> DML: clear() on atomic cache causes the exception from previous failed DML 
> statement
> ------------------------------------------------------------------------------------
>
>                 Key: IGNITE-4342
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4342
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.8
>            Reporter: Sergey Kozlov
>            Assignee: Alexander Paschenko
>             Fix For: 1.8
>
>         Attachments: IGNITE-4342.zip
>
>
> 0. Extact the attachment into {{examples}} directory
> 1. Start {{ExtSqlExampleNodeStartup}}
> 2. Start {{ExtSqlAtomicExample}}. It fails:
> {noformat}
> [17:22:23,763][INFO ][main][GridDiscoveryManager] Topology snapshot [ver=6, 
> servers=1, clients=1, CPUs=8, heap=2.0GB]
> The cache size atomic-part-full-sync: 0
> Preloading ... 
> The cache size atomic-part-full-sync: 1000
> Update failed
> Clear cache atomic-part-full-sync
> [17:22:25,207][ERROR][mgmt-#60%null%][GridTaskWorker] Failed to obtain remote 
> job result policy for result from ComputeTask.result(..) method (will fail 
> the whole task): GridJobResultImpl 
> [job=o.a.i.i.processors.cache.GridCacheAdapter$GlobalClearAllJob@5dca5ddf, 
> sib=GridJobSiblingImpl 
> [sesId=3fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> nodeId=87311db5-3911-41f6-ac47-e739031a91dd, isJobDone=false], 
> jobCtx=GridJobContextImpl 
> [jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, timeoutObj=null, 
> attrs={}], node=TcpDiscoveryNode [id=87311db5-3911-41f6-ac47-e739031a91dd, 
> addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 172.22.222.137, 172.25.4.107], 
> sockAddrs=[/172.22.222.137:47500, /172.25.4.107:47500, /127.0.0.1:47500, 
> /0:0:0:0:0:0:0:1:47500], discPort=47500, order=1, intOrder=1, 
> lastExchangeTime=1480515743167, loc=false, ver=1.8.0#20161128-sha1:a53fd38c, 
> isClient=false], ex=class o.a.i.compute.ComputeUserUndeclaredException: 
> Failed to execute job due to unexpected runtime exception 
> [jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> ses=GridJobSessionImpl [ses=GridTaskSessionImpl 
> [taskName=o.a.i.i.processors.cache.GridCacheAdapter$ClearTask, 
> dep=LocalDeployment [super=GridDeployment [ts=1480515673415, depMode=SHARED, 
> clsLdr=sun.misc.Launcher$AppClassLoader@2e5f8245, 
> clsLdrId=ef34c95b851-87311db5-3911-41f6-ac47-e739031a91dd, userVer=0, 
> loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, 
> undeployed=false, usage=0]], 
> taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$ClearTask, 
> sesId=3fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> startTime=1480515745181, endTime=9223372036854775807, 
> taskNodeId=3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> clsLdr=sun.misc.Launcher$AppClassLoader@2e5f8245, closed=false, cpSpi=null, 
> failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=true, 
> subjId=3bc6c31d-7339-434a-b0cd-2edda611fc19, mapFut=IgniteFuture 
> [orig=GridFutureAdapter [resFlag=0, res=null, startTime=1480515745181, 
> endTime=0, ignoreInterrupts=false, state=INIT]]], 
> jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19]], hasRes=true, 
> isCancelled=false, isOccupied=true]
> class org.apache.ignite.IgniteException: Remote job threw exception.
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$ClearTask.result(GridCacheAdapter.java:6800)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1030)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1023)
>       at 
> org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6596)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:1023)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:841)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:996)
>       at 
> org.apache.ignite.internal.processors.task.GridTaskProcessor$JobMessageListener.onMessage(GridTaskProcessor.java:1221)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1082)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:710)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$1700(GridIoManager.java:102)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:673)
>       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: class org.apache.ignite.compute.ComputeUserUndeclaredException: 
> Failed to execute job due to unexpected runtime exception 
> [jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> ses=GridJobSessionImpl [ses=GridTaskSessionImpl 
> [taskName=org.apache.ignite.internal.processors.cache.GridCacheAdapter$ClearTask,
>  dep=LocalDeployment [super=GridDeployment [ts=1480515673415, depMode=SHARED, 
> clsLdr=sun.misc.Launcher$AppClassLoader@2e5f8245, 
> clsLdrId=ef34c95b851-87311db5-3911-41f6-ac47-e739031a91dd, userVer=0, 
> loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, 
> undeployed=false, usage=0]], 
> taskClsName=org.apache.ignite.internal.processors.cache.GridCacheAdapter$ClearTask,
>  sesId=3fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> startTime=1480515745181, endTime=9223372036854775807, 
> taskNodeId=3bc6c31d-7339-434a-b0cd-2edda611fc19, 
> clsLdr=sun.misc.Launcher$AppClassLoader@2e5f8245, closed=false, cpSpi=null, 
> failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=true, 
> subjId=3bc6c31d-7339-434a-b0cd-2edda611fc19, mapFut=IgniteFuture 
> [orig=GridFutureAdapter [resFlag=0, res=null, startTime=1480515745181, 
> endTime=0, ignoreInterrupts=false, state=INIT]]], 
> jobId=4fe2d95b851-3bc6c31d-7339-434a-b0cd-2edda611fc19]]
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.handleThrowable(GridJobWorker.java:662)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:598)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:479)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at 
> org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1114)
>       at 
> org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1894)
>       ... 7 more
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$RowDescriptor.wrap(IgniteH2Indexing.java:2960)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2AbstractKeyValueRow.getValue(GridH2AbstractKeyValueRow.java:316)
>       at org.h2.index.BaseIndex.compareRows(BaseIndex.java:295)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.compare(GridH2TreeIndex.java:202)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.compare(GridH2TreeIndex.java:48)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap$2.compareTo(GridOffHeapSnapTreeMap.java:1401)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap$2.compareTo(GridOffHeapSnapTreeMap.java:1397)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.attemptUpdate(GridOffHeapSnapTreeMap.java:2153)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.updateUnderRoot(GridOffHeapSnapTreeMap.java:2085)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.update(GridOffHeapSnapTreeMap.java:1966)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.remove(GridOffHeapSnapTreeMap.java:1935)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.remove(GridOffHeapSnapTreeMap.java:108)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.remove(GridH2TreeIndex.java:367)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.doUpdate(GridH2Table.java:594)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.update(GridH2Table.java:495)
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.remove(IgniteH2Indexing.java:666)
>       at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.remove(GridQueryProcessor.java:1056)
>       at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.remove(GridCacheQueryManager.java:456)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.clearIndex(GridCacheMapEntry.java:4039)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.clear(GridCacheMapEntry.java:2816)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheClearAllRunnable.clearEntry(GridCacheClearAllRunnable.java:145)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheClearAllRunnable.run(GridCacheClearAllRunnable.java:96)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.clearLocally(GridCacheAdapter.java:1141)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.clearLocally(GridCacheProxyImpl.java:1048)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$GlobalClearAllJob.localExecute(GridCacheAdapter.java:5461)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$TopologyVersionAwareJob.execute(GridCacheAdapter.java:6473)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:556)
>       at 
> org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6564)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:550)
>       ... 11 more
> [17:22:25,213][INFO ][main][GridTcpRestProtocol] Command protocol 
> successfully stopped: TCP binary
> [17:22:25,229][INFO ][main][GridCacheProcessor] Stopped cache: 
> tx-repl-primary-sync
> [17:22:25,232][INFO ][main][GridCacheProcessor] Stopped cache: 
> tx-part-primary-sync
> [17:22:25,234][INFO ][main][GridCacheProcessor] Stopped cache: 
> atomic-repl-primary-sync
> [17:22:25,237][INFO ][main][GridCacheProcessor] Stopped cache: 
> atomic-part-primary-sync
> [17:22:25,239][INFO ][main][GridCacheProcessor] Stopped cache: 
> tx-repl-full-sync
> [17:22:25,241][INFO ][main][GridCacheProcessor] Stopped cache: 
> tx-part-full-sync
> [17:22:25,242][INFO ][main][GridCacheProcessor] Stopped cache: 
> atomic-repl-full-sync
> [17:22:25,244][INFO ][main][GridCacheProcessor] Stopped cache: 
> atomic-part-full-sync
> [17:22:25,244][INFO ][main][GridCacheProcessor] Stopped cache: 
> ignite-marshaller-sys-cache
> [17:22:25,244][INFO ][main][GridCacheProcessor] Stopped cache: 
> ignite-sys-cache
> [17:22:25,244][INFO ][main][GridCacheProcessor] Stopped cache: 
> ignite-atomics-sys-cache
> Exception in thread "main" javax.cache.CacheException: class 
> org.apache.ignite.IgniteCheckedException: java.lang.Integer cannot be cast to 
> java.lang.Long
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1440)
>       at 
> org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:2183)
>       at 
> org.apache.ignite.internal.processors.cache.IgniteCacheProxy.clear(IgniteCacheProxy.java:1704)
>       at 
> org.apache.ignite.examples.datagrid.ExtSqlAtomicExample.main(ExtSqlAtomicExample.java:45)
>       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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> Caused by: class org.apache.ignite.IgniteCheckedException: java.lang.Integer 
> cannot be cast to java.lang.Long
>       at 
> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7185)
>       at 
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:169)
>       at 
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:118)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.clear(GridCacheAdapter.java:1197)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.clear(GridCacheAdapter.java:1164)
>       at 
> org.apache.ignite.internal.processors.cache.IgniteCacheProxy.clear(IgniteCacheProxy.java:1701)
>       ... 6 more
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$RowDescriptor.wrap(IgniteH2Indexing.java:2960)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2AbstractKeyValueRow.getValue(GridH2AbstractKeyValueRow.java:316)
>       at org.h2.index.BaseIndex.compareRows(BaseIndex.java:295)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.compare(GridH2TreeIndex.java:202)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.compare(GridH2TreeIndex.java:48)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap$2.compareTo(GridOffHeapSnapTreeMap.java:1401)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap$2.compareTo(GridOffHeapSnapTreeMap.java:1397)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.attemptUpdate(GridOffHeapSnapTreeMap.java:2153)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.updateUnderRoot(GridOffHeapSnapTreeMap.java:2085)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.update(GridOffHeapSnapTreeMap.java:1966)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.remove(GridOffHeapSnapTreeMap.java:1935)
>       at 
> org.apache.ignite.internal.util.offheap.unsafe.GridOffHeapSnapTreeMap.remove(GridOffHeapSnapTreeMap.java:108)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2TreeIndex.remove(GridH2TreeIndex.java:367)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.doUpdate(GridH2Table.java:594)
>       at 
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.update(GridH2Table.java:495)
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.remove(IgniteH2Indexing.java:666)
>       at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.remove(GridQueryProcessor.java:1056)
>       at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.remove(GridCacheQueryManager.java:456)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.clearIndex(GridCacheMapEntry.java:4039)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.clear(GridCacheMapEntry.java:2816)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheClearAllRunnable.clearEntry(GridCacheClearAllRunnable.java:145)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheClearAllRunnable.run(GridCacheClearAllRunnable.java:96)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.clearLocally(GridCacheAdapter.java:1141)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.clearLocally(GridCacheProxyImpl.java:1048)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$GlobalClearAllJob.localExecute(GridCacheAdapter.java:5461)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheAdapter$TopologyVersionAwareJob.execute(GridCacheAdapter.java:6473)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:556)
>       at 
> org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6564)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:550)
>       at 
> org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:479)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at 
> org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1114)
>       at 
> org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1894)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1082)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:710)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$1700(GridIoManager.java:102)
>       at 
> org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:673)
>       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)
> [17:22:25,247][INFO ][main][IgniteKernal] 
> >>> +------------------------------------------------------------------------------------------+
> >>> Ignite ver. 
> >>> 1.8.0-QAIS2801#20161128-sha1:a53fd38c0bdb65c454affa947b2edb7b694973c4 
> >>> stopped OK
> >>> +------------------------------------------------------------------------------------------+
> >>> Grid uptime: 00:00:01:488
> Process finished with exit code 1
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to