Ignite 的缓存方法挂起



我使用的是 Ignite.NET 2.7.6,有时它会挂起调用缓存的方法,如 TryGet 或 MoveNext 作为缓存的枚举器。

我有一个服务器和多个客户端节点,挂起发生在客户端。

典型调用堆栈:

Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.CallVoidMethod(Apache.Ignite.Core.Impl.Unmanaged.Jni.GlobalRef obj, System.IntPtr methodId, long* argsPtr( Line 213 C# Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetOutStream(Apache.Ignite.Core.Impl.Unmanaged.Jni.GlobalRef target, int opType, long memPtr( Line 145 C# Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.PlatformJniTarget.OutStream(int type, System.Func readAction( Line 147 C# Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.PlatformTargetAdapter.DoInOp(int type, System.Func action( 第 193 行 C# Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.Cache.CacheEnumerator.MoveNext() Line 55 C# Apache.Ignite.Core.dll!Apache.Ignite.Core.Impl.Cache.CacheEnumeratorProxy.MoveNext(( 第 71 行 C# 阿尔法库.dll!Casino.Table.Enumerator.MoveNext(( line 503 C#

它挂在CallVoidMethod中。我试图在一个简单的项目中重现它,但失败了。

如果我在启动服务器节点的计算机上启动客户端,则会更频繁地重现。

关于为什么会发生这种情况的任何假设?

添加

我在挂起的情况下检查了JVM状态,这是完整的堆栈:https://pastebin.com/v5HiuQWb 看起来这个线程卡住了:

"Thread-11" #148 prio=5 os_prio=0 tid=0x000001ae99665800 nid=0x34c4 in Object.wait() [0x00000050156bc000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.internalIterator(GridCacheQueryFutureAdapter.java:301)
- locked <0x00000005d494de98> (a org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryFuture)
at org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.next(GridCacheQueryFutureAdapter.java:158)
at org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager$5.onHasNext(GridCacheDistributedQueryManager.java:642)
at org.apache.ignite.internal.util.GridCloseableIteratorAdapter.hasNextX(GridCloseableIteratorAdapter.java:53)
at org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45)
at org.apache.ignite.internal.processors.platform.cache.query.PlatformAbstractQueryCursor.processOutStream(PlatformAbstractQueryCursor.java:92)
at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.outStream(PlatformTargetProxyImpl.java:93)

似乎这段代码挂起了:

long waitTime = timeout == 0 ? Long.MAX_VALUE : timeout - (U.currentTimeMillis() - startTime);
if (waitTime <= 0) {
it = Collections.<R>emptyList().iterator();
break;
}
synchronized (this) {
try {
if (queue.isEmpty() && !isDone())
wait(waitTime); /* HERE!!! */
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IgniteCheckedException("Query was interrupted: " + qry, e);
}
}

我想在我的情况下超时是 0,所以它会无限等待,所以可以将其设置为有限值。但这看起来不是一个好的解决方案。

在我们的网络中,有一个赛门铁克保护系统,它意外地开始关闭Ignite使用的端口。在客户端和服务器端。此外,它在启动后的某个事件或时间后开始关闭这些端口 - 我不明白。我在赛门铁克日志中找到了它。

将使用的端口添加到白名单后,问题已解决。

最新更新