You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2017/07/19 16:51:00 UTC
[jira] [Commented] (IGNITE-5786) .NET: Transaction fails with
multiple write-through caches
[ https://issues.apache.org/jira/browse/IGNITE-5786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093394#comment-16093394 ]
Pavel Tupitsyn commented on IGNITE-5786:
----------------------------------------
To fix this we should clear {{KEY_SES}} value in {{PlatformDotNetCacheStore.sessionEnd()}} call.
> .NET: Transaction fails with multiple write-through caches
> ----------------------------------------------------------
>
> Key: IGNITE-5786
> URL: https://issues.apache.org/jira/browse/IGNITE-5786
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 1.6
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Labels: .NET
> Fix For: 2.2
>
>
> To reproduce: create two caches with {{WriteThrough=true}} and some {{CacheStore}} (implementation can be empty).
> Attempt to update both caches within a transaction:
> {code}
> using (var tx = ignite.GetTransactions().TxStart())
> {
> cache1.Put(1, 1);
> cache2.Put(1, 1);
> tx.Commit();
> }
> {code}
> Exception occurs:
> {code}
> (err) Failed to notify listener: o.a.i.i.processors.cache.distributed.near.GridNearTxLocal$16@17695df3javax.cache.integration.CacheWriterException: PlatformNativeException [cause=System.InvalidOperationException [idHash=1909546776, hash=1265661973, ClassName=System.InvalidOperationException, Data=null, ExceptionMethod=8
> Get
> Apache.Ignite.Core, Version=2.1.0.19388, Culture=neutral, PublicKeyToken=a487a7ff0b2aaa4a
> Apache.Ignite.Core.Impl.Handle.HandleRegistry
> T Get[T](Int64, Boolean), HelpURL=null, HResult=-2146233079, InnerException=null, Message=Resource handle has been released (is Ignite stopping?)., RemoteStackIndex=0, RemoteStackTraceString=null, Source=Apache.Ignite.Core, StackTraceString= at Apache.Ignite.Core.Impl.Handle.HandleRegistry.Get[T](Int64 id, Boolean throwOnAbsent) in C:\w\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Handle\HandleRegistry.cs:line 262
> at Apache.Ignite.Core.Impl.Cache.Store.CacheStoreInternal`2.Invoke(IBinaryStream stream, Ignite grid) in C:\w\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Cache\Store\CacheStoreInternal.cs:line 112
> at Apache.Ignite.Core.Impl.Cache.Store.CacheStore.Invoke(PlatformMemoryStream stream, Ignite grid) in C:\w\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Cache\Store\CacheStore.cs:line 127
> at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedCallbacks.CacheStoreInvoke(Int64 memPtr) in C:\w\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Unmanaged\UnmanagedCallbacks.cs:line 366
> {code}
> Explanation:
> * Cache stores share same session within a transaction
> * Session in Java is uses to store .NET session handle, so both stores have the same .NET session (which is good: consistent with Java)
> * Each store calls sessionEnd, so session gets released multiple times - this causes HandleRegistry exception
> Current unit test uses Spring XML with shared {{PlatformDotNetCacheStoreFactory}}, which caches created store instance for some reason, so the bug is hidden, since both caches use the same store instance.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)