带有死锁的条带池可能存在饥饿 - Apache Ignite

时间:2017-07-11 08:13:39

标签: java c# .net apache ignite

我有关于Apache Ignite的问题。我的测试是使用Ignite服务器(用java编写,使用连续查询接收已更改变量的通知)和Ignite客户端(用.Net编写,使用putAll方法发送1000个变量的变量的通知) 50毫秒)。 每个putAll同时发送大约350个变量。 我收到的错误是:

  

2017-07-11 09:56:33,491 [WARN] [grid-timeout-worker-#19%null%] G -    条纹池中可能存在饥饿现象。       线程名称:sys-stripe-9-#10%null%       队列:[消息闭包[msg = GridIoMessage [plc = 2,topic = TOPIC_CACHE,topicOrd = 8,ordered = false,timeout = 0,   skipOnTimeout = false,msg = GridNearAtomicFullUpdateRequest   [keys = [KeyCacheObjectImpl [part = 117,val = null,hasValBytes = true],   KeyCacheObjectImpl [part = 670,val = null,hasValBytes = true]],   conflictTtls = null,conflictExpireTimes = null,expiryPlc = null,   initSize = 0,filter = null,parent = GridNearAtomicAbstractUpdateRequest   [res = null,flags = keepBinary]]]]]       死锁:是的       完成:4941线程[name =" sys-stripe-9-#10%null%",id = 22,state = BLOCKED,blockCnt = 6,waitCnt = 4889]       锁[object=o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCacheEntry@541d822b,   ownerName = sys-stripe-5-#6%null%,ownerId = 18]           at sun.misc.Unsafe.monitorEnter(Native Method)           at o.a.i.i.util.GridUnsafe.monitorEnter(GridUnsafe.java:1193)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2815)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1741)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1630)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3016)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access $ 400(GridDhtAtomicCache.java:127)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache $ 6.apply(GridDhtAtomicCache.java:282)           at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache $ 6.apply(GridDhtAtomicCache.java:277)           at o.a.i.i.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863)           at o.a.i.i.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386)           at o.a.i.i.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308)           at o.a.i.i.processors.cache.GridCacheIoManager.access $ 000(GridCacheIoManager.java:100)           在o.a.i.i.processors.cache.GridCacheIoManager $ 1.onMessage(GridCacheIoManager.java:253)           在o.a.i.i.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257)           at o.a.i.i.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885)           at o.a.i.i.managers.communication.GridIoManager.access $ 2100(GridIoManager.java:114)           at o.a.i.i.managers.communication.GridIoManager $ 7.run(GridIoManager.java:802)           at o.a.i.i.util.StripedExecutor $ Stripe.run(StripedExecutor.java:483)           在java.lang.Thread.run(Thread.java:748)

谢谢大家的帮助。

啤酒

2 个答案:

答案 0 :(得分:1)

在将集合应用于putAll之前对集合进行排序,对不同顺序的相同条目进行批处理操作可能会导致死锁。

答案 1 :(得分:0)

当我们尝试将JsonObject放入Cache时,发生了相同的问题。因此,我们使用putAsync代替了put操作,它可以正常工作