有时,并非总是如此,当集群的拓扑发生变化时,我的应用程序挂起的时间可能长达1分钟或更长时间。然后在日志中看到以下“点燃”警告。我想这就是我的应用程序挂在缓存操作上的原因。
是什么导致多头交易?我希望是网络问题还是GC?
我无法找出代码中的哪个缓存操作导致了此长时间的事务。该警告是否可以帮助我找出它的作用?
22:00:30.456 [grid-timeout-worker-#63][101] WARN org.apache.ignite.internal.diagnostic-[warning] Found long running transaction [startTime=21:58:57.176, curTime=22:00:30.456, tx=GridNearTxLocal [mappings=IgniteTxMappingsImpl [], nearLocallyMapped=false, colocatedLocallyMapped=false, needCheckBackup=null, hasRemoteLocks=false, trackTimeout=false, lb=null, thread=<failed to find active thread 1498>, mappings=IgniteTxMappingsImpl [], super=GridDhtTxLocalAdapter [nearOnOriginatingNode=false, nearNodes=[], dhtNodes=[], explicitLock=false, super=IgniteTxLocalAdapter [completedBase=null, sndTransformedVals=false, depEnabled=false, txState=IgniteTxStateImpl [activeCacheIds=[], recovery=null, txMap=[]], super=IgniteTxAdapter [xidVer=GridCacheVersion [topVer=147994093, order=1536523104974, nodeOrder=74], writeVer=null, implicit=false, loc=true, threadId=1498, startTime=1536523137176, nodeId=e8153238-1d5a-4149-8db8-83a9fc820750, startVer=GridCacheVersion [topVer=147994093, order=1536523104974, nodeOrder=74], endVer=null, isolation=REPEATABLE_READ, concurrency=PESSIMISTIC, timeout=0, sysInvalidate=false, sys=false, plc=2, commitVer=null, finalizing=NONE, invalidParts=null, state=ACTIVE, timedOut=false, topVer=AffinityTopologyVersion [topVer=-1, minorTopVer=0], duration=93280ms, onePhaseCommit=false], size=0]]]]
我的缓存是这样创建的:
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="MFDB_JobList" />
<property name="cacheMode" value="PARTITIONED" />
<property name="backups" value="0" />
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="writeSynchronizationMode" value="FULL_SYNC"/>
<property name="indexedTypes">
<list>
<value>java.util.UUID</value>
<value>CacheJobQueueEntry</value>
</list>
</property>
</bean>
相关的点火配置如下:
<property name="networkTimeout" value="60000" />
<property name="networkSendRetryCount" value="10" />
<property name="failureDetectionTimeout" value="100000" />
<property name="clientFailureDetectionTimeout" value="100000" />
答案 0 :(得分:0)
通过下面的链接:-
https://issues.apache.org/jira/browse/IGNITE-6980
还要尝试
<property name="atomicityMode" value="ATOMIC"/>
使用异步缓存操作。这可能有助于最小化上述问题。