Pavel Tupitsyn created IGNITE-5786:
-------------------------------------- Summary: .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 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$[hidden email]: 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) |
Free forum by Nabble | Edit this page |