You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Narayana Rengaswamy <na...@optym.com> on 2017/07/17 13:26:37 UTC

Exception while using Transactions and Write Through

Hi,

I'm getting the below exception when trying to update cache using TransactionScope API. If I access only one cache, the error does not happen. The transactionscope.Complete() call works fine always, but the dispose call is what throws exception. The code first selects data from multiple caches using SQL QueryFields, and updates one cache (the whole thing is in a transaction)

What would be the reason for this exception?

Apache.Ignite.Core.Cache.Store.CacheStoreException: 'PlatformNativeException [cause=System.InvalidOperationException [idHash=418513504, hash=2117236139, StackTraceString=   at Apache.Ignite.Core.Impl.Handle.HandleRegistry.Get[T](Int64 id, Boolean throwOnAbsent)
   at Apache.Ignite.Core.Impl.Cache.Store.CacheStoreInternal`2.Invoke(IBinaryStream stream, Ignite grid)
   at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.CacheStoreInvoke(Int64 memPtr), Message=Resource handle has been released (is Ignite stopping?)., HResult=-2146233079, RemoteStackTraceString=null, ClassName=System.InvalidOperationException, InnerException=null, Data=null, WatsonBuckets=null, ExceptionMethod=8
Get
Apache.Ignite.Core, Version=2.1.1.20852, Culture=neutral, PublicKeyToken=a487a7ff0b2aaa4a
Apache.Ignite.Core.Impl.Handle.HandleRegistry
T Get[T](Int64, Boolean), RemoteStackIndex=0, HelpURL=null, Source=Apache.Ignite.Core]]'

Inner Exception:
JavaException: javax.cache.integration.CacheWriterException: PlatformNativeException [cause=System.InvalidOperationException [idHash=418513504, hash=2117236139, StackTraceString=   at Apache.Ignite.Core.Impl.Handle.HandleRegistry.Get[T](Int64 id, Boolean throwOnAbsent)
   at Apache.Ignite.Core.Impl.Cache.Store.CacheStoreInternal`2.Invoke(IBinaryStream stream, Ignite grid)
   at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.CacheStoreInvoke(Int64 memPtr), Message=Resource handle has been released (is Ignite stopping?)., HResult=-2146233079, RemoteStackTraceString=null, ClassName=System.InvalidOperationException, InnerException=null, Data=null, WatsonBuckets=null, ExceptionMethod=8
Get
Apache.Ignite.Core, Version=2.1.1.20852, Culture=neutral, PublicKeyToken=a487a7ff0b2aaa4a
Apache.Ignite.Core.Impl.Handle.HandleRegistry
T Get[T](Int64, Boolean), RemoteStackIndex=0, HelpURL=null, Source=Apache.Ignite.Core]]
              at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.sessionEnd(PlatformDotNetCacheStore.java:344)
              at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.sessionEnd(GridCacheStoreManagerAdapter.java:784)
              at org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter.sessionEnd(IgniteTxAdapter.java:1162)
              at org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.userRollback(IgniteTxLocalAdapter.java:979)
              at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.localFinish(GridNearTxLocal.java:3029)
              at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:405)
              at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$16.apply(GridNearTxLocal.java:3182)
              at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$16.apply(GridNearTxLocal.java:3169)
              at org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:382)
              at org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:352)
              at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.commitNearTxLocalAsync(GridNearTxLocal.java:3169)
              at org.apache.ignite.internal.processors.cache.GridCacheSharedContext.commitTxAsync(GridCacheSharedContext.java:873)
              at org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.commit(TransactionProxyImpl.java:259)
              at org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions.processInLongOutLong(PlatformTransactions.java:168)
              at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inLongOutLong(PlatformTargetProxyImpl.java:53)
Caused by: PlatformNativeException [cause=System.InvalidOperationException [idHash=418513504, hash=2117236139, StackTraceString=   at Apache.Ignite.Core.Impl.Handle.HandleRegistry.Get[T](Int64 id, Boolean throwOnAbsent)
   at Apache.Ignite.Core.Impl.Cache.Store.CacheStoreInternal`2.Invoke(IBinaryStream stream, Ignite grid)
   at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.CacheStoreInvoke(Int64 memPtr), Message=Resource handle has been released (is Ignite stopping?)., HResult=-2146233079, RemoteStackTraceString=null, ClassName=System.InvalidOperationException, InnerException=null, Data=null, WatsonBuckets=null, ExceptionMethod=8
Get
Apache.Ignite.Core, Version=2.1.1.20852, Culture=neutral, PublicKeyToken=a487a7ff0b2aaa4a
Apache.Ignite.Core.Impl.Handle.HandleRegistry
T Get[T](Int64, Boolean), RemoteStackIndex=0, HelpURL=null, Source=Apache.Ignite.Core]]
              at org.apache.ignite.internal.processors.platform.PlatformContextImpl.createNativeException(PlatformContextImpl.java:679)
              at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.doInvoke(PlatformDotNetCacheStore.java:448)
              at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.sessionEnd(PlatformDotNetCacheStore.java:334)
              ... 14 more



Thanks!
Narayana.

RE: Exception while using Transactions and Write Through

Posted by Narayana Rengaswamy <na...@optym.com>.
Hi Val,

Please find an independent working sample attached which throws the cryptic error. Appreciate your help! In the Client code, if you do only one upsert, it works.

Thanks,
Narayana.

Narayana Rengaswamy
Optym - Live Efficiently
M: +91-875-450-9770

-----Original Message-----
From: vkulichenko [mailto:valentin.kulichenko@gmail.com] 
Sent: 17 July 2017 22:38
To: user@ignite.apache.org
Subject: Re: Exception while using Transactions and Write Through

Hi Narayana,

Can you show the code that is working and that code that is not working?

Also note that SQL queries are currently not enlisted in transactions anyway, so most likely you're not having semantics that you expect.
Transactional support for SQL is expected sometime this year.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-while-using-Transactions-and-Write-Through-tp15002p15013.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Exception while using Transactions and Write Through

Posted by vkulichenko <va...@gmail.com>.
Hi Narayana,

Can you show the code that is working and that code that is not working?

Also note that SQL queries are currently not enlisted in transactions
anyway, so most likely you're not having semantics that you expect.
Transactional support for SQL is expected sometime this year.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-while-using-Transactions-and-Write-Through-tp15002p15013.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.