You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2016/01/21 08:33:02 UTC

[14/19] ignite git commit: IGNITE-2410: .NET: Fixed JVM crash in DestroyCache() method. This closes #413.

IGNITE-2410: .NET: Fixed JVM crash in DestroyCache() method. This closes #413.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4079a65d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4079a65d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4079a65d

Branch: refs/heads/sql-store
Commit: 4079a65dc277b0187aa7727a0a0ce2ad1d325a74
Parents: 4d29b2d
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Wed Jan 20 14:59:32 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Jan 20 14:59:32 2016 +0300

----------------------------------------------------------------------
 .../dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs | 2 ++
 .../Impl/Unmanaged/IgniteJniNativeMethods.cs                   | 2 +-
 .../dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs | 6 ++----
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4079a65d/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
index 0237a41..e57df6f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
@@ -3117,6 +3117,8 @@ namespace Apache.Ignite.Core.Tests.Cache
             var ex = Assert.Throws<ArgumentException>(() => ignite.GetCache<int, int>(cacheName));
 
             Assert.IsTrue(ex.Message.StartsWith("Cache doesn't exist"));
+
+            Assert.Throws<InvalidOperationException>(() => cache.Get(1));
         }
 
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4079a65d/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
index 70ad733..7a73bee 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
@@ -56,7 +56,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
         public static extern void* ProcessorGetOrCreateCache(void* ctx, void* obj, sbyte* name);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorDestroyCache")]
-        public static extern void* ProcessorDestroyCache(void* ctx, void* obj, sbyte* name);
+        public static extern void ProcessorDestroyCache(void* ctx, void* obj, sbyte* name);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorAffinity")]
         public static extern void* ProcessorAffinity(void* ctx, void* obj, sbyte* name);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4079a65d/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
index 7b12010..f460c9f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
@@ -163,15 +163,13 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             }
         }
 
-        internal static IUnmanagedTarget ProcessorDestroyCache(IUnmanagedTarget target, string name)
+        internal static void ProcessorDestroyCache(IUnmanagedTarget target, string name)
         {
             sbyte* name0 = IgniteUtils.StringToUtf8Unmanaged(name);
 
             try
             {
-                void* res = JNI.ProcessorDestroyCache(target.Context, target.Target, name0);
-
-                return target.ChangeTarget(res);
+                JNI.ProcessorDestroyCache(target.Context, target.Target, name0);
             }
             finally
             {