ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptupit...@apache.org
Subject [15/33] ignite git commit: IGNITE-3711 .NET: Fix PlatformRawMemory coverage issue
Date Mon, 14 Nov 2016 09:26:27 GMT
IGNITE-3711 .NET: Fix PlatformRawMemory coverage issue


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

Branch: refs/heads/master
Commit: cd0275d95dc6524464a154c74b1e62559b3d8af4
Parents: dc0adf6
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Fri Aug 19 17:34:00 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Tue Nov 1 19:26:43 2016 +0300

----------------------------------------------------------------------
 .../Impl/Memory/PlatformRawMemory.cs                  |  1 +
 .../Impl/Unmanaged/UnmanagedCallbacks.cs              | 14 +++++---------
 2 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cd0275d9/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
index f252ef3..c3cbee2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformRawMemory.cs
@@ -24,6 +24,7 @@ namespace Apache.Ignite.Core.Impl.Memory
     /// Non-resizeable raw memory chunk without metadata header.
     /// </summary>
     [CLSCompliant(false)]
+    [ExcludeFromCodeCoverage]
     public class PlatformRawMemory : IPlatformMemory
     {
         /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/cd0275d9/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
index fcc1652..95a4633 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
@@ -1097,6 +1097,11 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
         private void Error(void* target, int errType, sbyte* errClsChars, int errClsCharsLen,
sbyte* errMsgChars,
             int errMsgCharsLen, sbyte* stackTraceChars, int stackTraceCharsLen, void* errData,
int errDataLen)
         {
+            // errData mechanism is only needed for CachePartialUpdateException and is no
longer used,
+            // since CacheImpl handles all errors itself.
+            Debug.Assert(errDataLen == 0);
+            Debug.Assert(errData == null);
+
             string errCls = IgniteUtils.Utf8UnmanagedToString(errClsChars, errClsCharsLen);
             string errMsg = IgniteUtils.Utf8UnmanagedToString(errMsgChars, errMsgCharsLen);
             string stackTrace = IgniteUtils.Utf8UnmanagedToString(stackTraceChars, stackTraceCharsLen);
@@ -1104,15 +1109,6 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
             switch (errType)
             {
                 case ErrGeneric:
-                    if (_ignite != null && errDataLen > 0)
-                    {
-                        // Stream disposal intentionally omitted: IGNITE-1598
-                        var stream = new PlatformRawMemory(errData, errDataLen).GetStream();
-
-                        throw ExceptionUtils.GetException(_ignite, errCls, errMsg, stackTrace,
-                            _ignite.Marshaller.StartUnmarshal(stream));
-                    }
-
                     throw ExceptionUtils.GetException(_ignite, errCls, errMsg, stackTrace);
 
                 case ErrJvmInit:


Mime
View raw message