Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache Ignite缓存长时间运行事务_Ignite - Fatal编程技术网

Apache Ignite缓存长时间运行事务

Apache Ignite缓存长时间运行事务,ignite,Ignite,有时,并非总是,当集群的拓扑结构发生变化时,我的应用程序会挂起1分钟或更长时间。在日志中,我看到下面的点火警告。我想这就是我的应用程序挂起缓存操作的原因 是什么导致了长事务?我想是网络问题还是GC 我无法找出代码中的哪个缓存操作导致了这个长事务。警告是否有助于我了解它是什么操作 22:00:30.456 [grid-timeout-worker-#63][101] WARN org.apache.ignite.internal.diagnostic-[warning] Found long r

有时,并非总是,当集群的拓扑结构发生变化时,我的应用程序会挂起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]]]]
22:00:30.456[grid timeout worker-#63][101]WARN org.apache.ignite.internal.diagnostic-[warning]找到了长时间运行的事务[startTime=21:58:57.176,curTime=22:00:30.456,tx=GridNearTxLocal[mappings=IgniteTxMappingsImpl[],nearLocallyMapping=false,colocatedLocallyMapping=false,needCheckBackup=null,hasRemoteLocks=false,trackTimeout=false,lb=null,thread=,mappings=IgniteTxMappingsImpl[],super=GridHttxlocaladapter[nearOnOriginatingNode=false,nearNodes=[],dhtNodes=[],explicitLock=false,super=IgniteTxLocalAdapter[completedBase=null,SNDTTransformedVals=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[tover=147994093,order=1536523104974,nodeOrder=74],endVer=null,isolation=REPEATABLE_READ,concurrency=悲观,timeout=0,sysInvalidate=false,sys=false,plc=2,commitVer=null,finalizing=NONE,invalidParts=null,state=ACTIVE,timedOut=false,topVer=affinitytopolyVersion[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" />

java.util.UUID
CacheJobQueueEntry
相关点火配置如下所示:

<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" />

浏览以下链接:-

并且也尝试一下

<property name="atomicityMode" value="ATOMIC"/> 


使用异步缓存操作。这可能有助于最小化上述问题。

听起来exchange在您的群集中运行得太慢了。您能否共享日志以及应用程序挂起时执行的几个连续线程转储?@DonTequila群集中有多少节点?存储了多少数据?是否启用了磁盘持久性?@Dmitiy很抱歉,丢失了所有这些信息。这些错误只有3个节点。persistence是emable。我想我发现我使用SqlQuery查询了一个包含大量数据的缓存,这在每次缓存更新时都花费了相当长的时间。现在我使用的SqlFieldsQuery只有几列,整个集群必须更快。data ThoughtPut是以前的平均速度约为500mb/s,现在只有40kb/s。如果错误仍然发生,我会密切关注。谢谢!