gpt4 book ai didi

java - strip 池中可能出现饥饿且死锁为真 - Apache Ignite

转载 作者:行者123 更新时间:2023-12-02 12:38:54 27 4
gpt4 key购买 nike

我有一个关于 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 - Possible starvation in striped pool. Thread name: sys-stripe-9-#10%null% Queue: [Message closure [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]]]]] Deadlock: true Completed: 4941 Thread [name="sys-stripe-9-#10%null%", id=22, state=BLOCKED, blockCnt=6, waitCnt=4889] Lock [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) at o.a.i.i.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:253) at 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) at java.lang.Thread.run(Thread.java:748)

最佳答案

在将 Collection 应用于 putAll 之前先对其进行排序,以不同顺序对相同条目进行批量操作可能会导致死锁。

关于java - strip 池中可能出现饥饿且死锁为真 - Apache Ignite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45028962/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com