You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Lucky <wa...@163.com> on 2018/01/17 03:02:09 UTC

delete data error

Hi
   When delete some data,it got an error.
   sql = "delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData ";
cache.query(new SqlFieldsQuery(sql))
    I use jdbc to excute this sql ,it's the same.   
    This table has about 200000 records.
    I had check the data ,and found the data is normal.


    What  did I  miss?
    Thanks.


    Here is the trace:


javax.cache.CacheException: class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to process key '1516002613660-100-82' at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:597) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:560) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:382) at xxx.xxx.xxx.basedata.framework.app.IgniteDatabaseDAssignService.batchExecute(IgniteDatabaseDAssignService.java:50) at xxx.xxx.xxx.sss.sss.sss.sss.CustomerControllerBean.batchAssignCompanyInfo2(CustomerControllerBean.java:5226) at xxx.xxx.xxx.sss.sss.sss.sss.CustomerControllerBean._batchAssignAssist(CustomerControllerBean.java:5718) at xxx.xxx.xxx.sss.sss.sss.sss.AbstractCustomerControllerBean.batchAssignAssist(AbstractCustomerControllerBean.java:862) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at xxx.xxx.x22.transaction.EJBTxFacade.TxInvokerBean.invoke(TxInvokerBean.java:125) at xxx.xxx.x22.transaction.EJBTxFacade.TxInvokerBean.INVOKE_REQUIRED(TxInvokerBean.java:60) at xxx.xxx.x22.transaction.EJBTxFacade.TxInvokerBean_LocalObjectImpl_2.INVOKE_REQUIRED(Unknown Source) at xxx.xxx.x22.transaction.EJBTransactionProxy.invoke(EJBTransactionProxy.java:171) at xxx.xxx.x22.transaction.EJBTransactionProxy.invoke(EJBTransactionProxy.java:324) at com.sun.proxy.$Proxy465.batchAssignAssist(Unknown Source)
       at xxx.xxx.xxx.basedata.master.cssp.Customer.batchAssignAssist(Customer.java:595) at rpc_generate._PROXY_com_1_kingdee_1_eas_1_basedata_1_master_1_cssp_1_ICustomer.pi120(Unknown Source) at rpc_generate._PROXY_com_1_kingdee_1_eas_1_basedata_1_master_1_cssp_1_ICustomer.processInvoke(Unknown Source) at xxx.xxx.x22.rpc.impl.ObjectProxy.processInvoke(ObjectProxy.java:177) at xxx.xxx.x22.rpc.impl.RPCService.serviceInvoke(RPCService.java:788) at xxx.xxx.x22.rpc.impl.RPCService.service(RPCService.java:141) at xxx.xxx.x22.rpc.impl.ServiceDispatcher.run(ServiceDispatcher.java:153) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482) at java.util.concurrent.FutureTask.run(FutureTask.java:273) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:853) Caused by: class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to process key '1516002613660-100-82'
        at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doDelete(DmlStatementsProcessor.java:581) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:444) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1453) at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:1909) at org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:1907) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2445) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1914) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:585) ... 28 more
Caused by: java.sql.SQLException: Failed to process key '1516002613660-100-82' at org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.createJdbcSqlException(IgniteQueryErrorCode.java:116) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.splitErrors(DmlStatementsProcessor.java:794) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processPage(DmlStatementsProcessor.java:934) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.access$600(DmlStatementsProcessor.java:105) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor$BatchSender.sendBatch(DmlStatementsProcessor.java:1329) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor$BatchSender.add(DmlStatementsProcessor.java:1282) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doDelete(DmlStatementsProcessor.java:560) ... 39 more Caused by: javax.cache.processor.EntryProcessorException: class org.apache.ignite.IgniteCheckedException: null at org.apache.ignite.internal.processors.cache.CacheInvokeResult.get(CacheInvokeResult.java:102) at org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.splitErrors(DmlStatementsProcessor.java:791) ... 44 more
Caused by: class org.apache.ignite.IgniteCheckedException: null at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7252) at org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1828) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateWithBatch(GridDhtAtomicCache.java:2073) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.update(GridDhtAtomicCache.java:1864) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1735) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1627) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3054) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$400(GridDhtAtomicCache.java:129) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:265) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:260) at org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:1060) at org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:579) at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:378) at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:304)
       at org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:99) at org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:293) at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1555) at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1183) at org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:126) at org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1090) at org.apache.ignite.internal.util.StripedExecutor$Stripe.run(StripedExecutor.java:505) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.ignite.internal.processors.query.GridQueryProcessor.typeByValue(GridQueryProcessor.java:1782) at org.apache.ignite.internal.processors.query.GridQueryProcessor.validateKeyAndValue(GridQueryProcessor.java:2671) at org.apache.ignite.internal.processors.cache.GridCacheContext.validateKeyAndValue(GridCacheContext.java:1825) ... 20 more

Re: Re:Re: Re:Re: delete data error

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

It seems that an issue was filed about the problem you are seeing:

https://issues.apache.org/jira/browse/IGNITE-7512

I can see that there's already work underway to fix is.

Regards,

-- 
Ilya Kasnacheev

2018-01-23 4:53 GMT+03:00 Lucky <wa...@163.com>:

> Sorry, the fid is not UUID in tmpCompanyCuBaseDataCache , but the other
> are UUID.
> The error is not happened only in this cache, the other are the same.
> I found when I delete a single record ,it's nomal .But If I delete many
> records in a SQL,it will get the wrong.
> Thanks.
>
>
> At 2018-01-23 09:38:18, "Lucky" <wa...@163.com> wrote:
>
> I put the entry like this:
>  cache.put(entry.getFID(),entry);
> The fid is a UUID, is only.
>
> I'm very sure that the data in the cache is no problem.
> All value is correct,and look like the other record.
>
>  sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData
> where fid='1516093156643-53-33' ";
>  sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData
> where _key='1516093156643-53-33' ";
>  It can both execute correctly.
>  Then I execute "delete from \"tmpCompanyCuBaseDataCache\".
> TmpCompanyCuBaseData" again, It got the same error, the key had changed
> to another one.
> And When I delete this record ,execute again ,it's the same......
>
> Thanks.
> Lucky.
>
>
>
>
>
>
>

Re:Re:Re: Re:Re: delete data error

Posted by Lucky <wa...@163.com>.
Sorry, the fid is not UUID in tmpCompanyCuBaseDataCache , but the other are UUID.
The error is not happened only in this cache, the other are the same.
I found when I delete a single record ,it's nomal .But If I delete many records in a SQL,it will get the wrong.
Thanks.



At 2018-01-23 09:38:18, "Lucky" <wa...@163.com> wrote:

I put the entry like this:
 cache.put(entry.getFID(),entry);
The fid is a UUID, is only.
 
I'm very sure that the data in the cache is no problem.
All value is correct,and look like the other record.


 sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData where fid='1516093156643-53-33' "; 
 sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData where _key='1516093156643-53-33' "; 

 It can both execute correctly.  
 Then I execute "delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData" again, It got the same error, the key had changed to another one.
And When I delete this record ,execute again ,it's the same......


Thanks.
Lucky.






Re:Re: Re:Re: delete data error

Posted by Lucky <wa...@163.com>.
I put the entry like this:
 cache.put(entry.getFID(),entry);
The fid is a UUID, is only.
 
I'm very sure that the data in the cache is no problem.
All value is correct,and look like the other record.


 sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData where fid='1516093156643-53-33' "; 
 sql="delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData where _key='1516093156643-53-33' "; 

 It can both execute correctly.  
 Then I execute "delete from \"tmpCompanyCuBaseDataCache\".TmpCompanyCuBaseData" again, It got the same error, the key had changed to another one.
And When I delete this record ,execute again ,it's the same......


Thanks.
Lucky.






At 2018-01-22 22:28:59, "Ilya Kasnacheev" <il...@gmail.com> wrote:

Hello!


Thank you for the log!


It looks like there's some internal consistency problem with the cache. From the log content the root cause is not apparent.


Can you please try getting the offending key from cache via Cache API (see if it's everything all right with it), and then deleting the key via cache API, and then retry the DELETE operation?


The key in question is '1516093156643-53-33'


Regards,





--

Ilya Kasnacheev



Re: Re:Re: delete data error

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Thank you for the log!

It looks like there's some internal consistency problem with the cache.
From the log content the root cause is not apparent.

Can you please try getting the offending key from cache via Cache API (see
if it's everything all right with it), and then deleting the key via cache
API, and then retry the DELETE operation?

The key in question is '1516093156643-53-33'

Regards,


-- 
Ilya Kasnacheev

2018-01-22 4:13 GMT+03:00 Lucky <wa...@163.com>:

>
> Is there any suggestion?
>
>
>
>
>
> At 2018-01-18 09:56:51, "Lucky" <wa...@163.com> wrote:
>
> This did not happen every time.
> When I run it several times,it will happen .And when it happened, then it will happened every time.
>
> This table is simple; I insert some data and when I finish the job,I will delete the data.
>
> Thanks.
>
>
> At 2018-01-17 20:20:34, "ilya.kasnacheev" <il...@gmail.com> wrote:
> >Hello Lucky!
> >
> >Does this happen every time when you try, or it is a one-time occurrence?
> >
> >Can you please share logs from your nodes and cache/table configurations?
> >Ideally a small reproducer project.
> >
> >Regards,
> >
> >
> >
>
>
>
>
>
>
>
>
>
>

Re:Re:Re: delete data error

Posted by Lucky <wa...@163.com>.
Is there any suggestion?





At 2018-01-18 09:56:51, "Lucky" <wa...@163.com> wrote:

This did not happen every time.
When I run it several times,it will happen .And when it happened, then it will happened every time.


This table is simple; I insert some data and when I finish the job,I will delete the data.


Thanks.




At 2018-01-17 20:20:34, "ilya.kasnacheev" <il...@gmail.com> wrote:
>Hello Lucky!
>
>Does this happen every time when you try, or it is a one-time occurrence?
>
>Can you please share logs from your nodes and cache/table configurations?
>Ideally a small reproducer project.
>
>Regards,
>
>
>






 

Re:Re: delete data error

Posted by Lucky <wa...@163.com>.
This did not happen every time.When I run it several times,it will happen .And when it happened, then it will happened every time.

This table is simple; I insert some data and when I finish the job,I will delete the data.


Thanks.




At 2018-01-17 20:20:34, "ilya.kasnacheev" <il...@gmail.com> wrote:
>Hello Lucky!
>
>Does this happen every time when you try, or it is a one-time occurrence?
>
>Can you please share logs from your nodes and cache/table configurations?
>Ideally a small reproducer project.
>
>Regards,
>
>
>


Re: delete data error

Posted by "ilya.kasnacheev" <il...@gmail.com>.
Hello Lucky!

Does this happen every time when you try, or it is a one-time occurrence?

Can you please share logs from your nodes and cache/table configurations?
Ideally a small reproducer project.

Regards,



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/