You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2020/11/26 12:32:00 UTC
[jira] [Commented] (IGNITE-13760) .NET: GetAffinity fails with
NullPointerException on client node
[ https://issues.apache.org/jira/browse/IGNITE-13760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17239230#comment-17239230 ]
Ignite TC Bot commented on IGNITE-13760:
----------------------------------------
{panel:title=Branch: [pull/8499/head] Base: [master] : Possible Blockers (8)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}MVCC Cache 7{color} [[tests 0 TIMEOUT , Exit Code |https://ci.ignite.apache.org/viewLog.html?buildId=5758214]]
{color:#d04437}Control Utility (Zookeeper){color} [[tests 0 TIMEOUT , Exit Code |https://ci.ignite.apache.org/viewLog.html?buildId=5758228]]
{color:#d04437}Platform .NET (Long Running){color} [[tests 0 Exit Code , Compilation Error |https://ci.ignite.apache.org/viewLog.html?buildId=5758198]]
{color:#d04437}Platform .NET (Core Linux){color} [[tests 1 TC_SERVICE_MESSAGE |https://ci.ignite.apache.org/viewLog.html?buildId=5758195]]
* dll: ProjectFilesTest.TestAllCsharpFilesAreIncludedInProject - Test has low fail rate in base branch 0,0% and is not flaky
{color:#d04437}Platform .NET{color} [[tests 0 Exit Code , Compilation Error |https://ci.ignite.apache.org/viewLog.html?buildId=5758194]]
{color:#d04437}Platform .NET (Inspections)*{color} [[tests 0 Exit Code , Compilation Error , Failure on metric |https://ci.ignite.apache.org/viewLog.html?buildId=5758196]]
{color:#d04437}Platform .NET (Integrations){color} [[tests 0 Exit Code , Compilation Error |https://ci.ignite.apache.org/viewLog.html?buildId=5758197]]
{color:#d04437}Platform .NET (NuGet)*{color} [[tests 0 Exit Code , Compilation Error |https://ci.ignite.apache.org/viewLog.html?buildId=5758199]]
{panel}
{panel:title=Branch: [pull/8499/head] Base: [master] : New Tests (1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Platform .NET (Core Linux){color} [[tests 1|https://ci.ignite.apache.org/viewLog.html?buildId=5758195]]
* {color:#013220}dll: AffinityTest.TestAffinityRetrievalForNewCache - PASSED{color}
{panel}
[TeamCity *--> Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=5758231&buildTypeId=IgniteTests24Java8_RunAll]
> .NET: GetAffinity fails with NullPointerException on client node
> ----------------------------------------------------------------
>
> Key: IGNITE-13760
> URL: https://issues.apache.org/jira/browse/IGNITE-13760
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.9
> Reporter: Alexey Kukushkin
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET
> Fix For: 2.9.1
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> * Given there are Ignite.NET server and client nodes
> * When the server node creates a cache and then the client node immediately gets affinity for the cache
> * Then getting affinity fails with NullPointerException
> {code:c#}
> IgniteConfiguration IgniteCfg(bool clientMode = false) => new IgniteConfiguration
> {
> ClientMode = clientMode,
> IgniteInstanceName = Guid.NewGuid().ToString(),
> DiscoverySpi = new TcpDiscoverySpi
> {
> IpFinder = new TcpDiscoveryStaticIpFinder
> {
> Endpoints = new[] { "127.0.0.1:47500" }
> }
> }
> };
> using var igniteSrv = Ignition.Start(IgniteCfg());
> using var igniteClient = Ignition.Start(IgniteCfg(true));
> var cache1 = igniteSrv.GetOrCreateCache<int, string>("cache1");
> igniteClient.GetAffinity("cache1");
> {code}
> The igniteClient.GetAffinity fails with this exception:
> {code}
> Apache.Ignite.Core.Common.IgniteException
> HResult=0x80131500
> Message=Java exception occurred [class=java.lang.NullPointerException, message=]
> Source=Apache.Ignite.Core
> StackTrace:
> at Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutObject(Int32 type, Action`1 writeAction)
> at Apache.Ignite.Core.Impl.PlatformTargetAdapter.DoOutOpObject(Int32 type, Action`1 action)
> at Apache.Ignite.Core.Impl.Ignite.Apache.Ignite.Core.Impl.IIgniteInternal.GetAffinity(String cacheName)
> at Apache.Ignite.Core.Impl.Ignite.GetAffinity(String cacheName)
> at DotNet.Sandbox.Program.Main(String[] args) in C:\Dev\tmp\DotNet.Sandbox\Program.cs:line 32
> This exception was originally thrown at this call stack:
> Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.ExceptionCheck()
> Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.CallObjectMethod(Apache.Ignite.Core.Impl.Unmanaged.Jni.GlobalRef, System.IntPtr, long*)
> Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetInStreamOutObject(Apache.Ignite.Core.Impl.Unmanaged.Jni.GlobalRef, int, long)
> Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutObject(int, System.Action<Apache.Ignite.Core.Impl.Binary.IO.IBinaryStream>)
> Inner Exception 1:
> JavaException: java.lang.NullPointerException
> at org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinity.<init>(PlatformAffinity.java:125)
> at org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.processInStreamOutObject(PlatformProcessorImpl.java:640)
> at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutObject(PlatformTargetProxyImpl.java:79)
> {code}
> h1. Workaround
> Add {{GetCache}} call before {{GetAffinity}}:
> {code:c#}
> ...
> var cache1 = igniteSrv.GetOrCreateCache<int, string>("cache1");
> igniteClient.GetCache<int, string>("cache1");
> igniteClient.GetAffinity("cache1");
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)