Return-Path: X-Original-To: apmail-ignite-issues-archive@minotaur.apache.org Delivered-To: apmail-ignite-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11AD1180A4 for ; Wed, 3 Feb 2016 11:58:40 +0000 (UTC) Received: (qmail 197 invoked by uid 500); 3 Feb 2016 11:58:40 -0000 Delivered-To: apmail-ignite-issues-archive@ignite.apache.org Received: (qmail 179 invoked by uid 500); 3 Feb 2016 11:58:39 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 154 invoked by uid 99); 3 Feb 2016 11:58:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2016 11:58:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C9F802C14F0 for ; Wed, 3 Feb 2016 11:58:39 +0000 (UTC) Date: Wed, 3 Feb 2016 11:58:39 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-2465) Assertion in load cache closure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-2465?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D151= 30283#comment-15130283 ]=20 ASF GitHub Bot commented on IGNITE-2465: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/ignite/pull/431 > Assertion in load cache closure > ------------------------------- > > Key: IGNITE-2465 > URL: https://issues.apache.org/jira/browse/IGNITE-2465 > Project: Ignite > Issue Type: Bug > Components: cache > Affects Versions: 1.5.0.final > Reporter: Denis Magda > Assignee: Semen Boikov > Priority: Blocker > Labels: important > Fix For: 1.6 > > > This is a tricky one. Every once in a while I get an assertion exception = due to a null cache instance. It's difficult to reproduce, but the reason i= s more or less clear. > First, here's the sequence of events: > 1) node N0 starts a cache with GridGain's LocalCacheStore configured (see= the cache config below). > 2) also, N0 registers a listener for the Ignite DISCO_EVENTS. > 3) node N1 joins the cluster. > 4) N0 receives a discovery event (EVT_NODE_JOINED) and triggers cache loa= ding using IgniteCache.loadCache(null). > 5) N1 throws an AssertionException due to Ignite.cache("persistent-cache"= ) call returning a null. > From the log snippet below you can see that the exception is first report= ed and then a millisecond later GridCacheProcessor reports that the cache w= as started. This means that the cache load closure starts executing on node= N1 a bit too early while the cache is still being started. I believe Ignit= e must be able to handle such race properly. > {noformat} > 9319 [pub-#212%N1%] ERROR GridJobWorker - Failed to execute job due to un= expected runtime exception [jobId=3D0af5bad7251-9f7af4ba-6a64-4de4-b5d2-81d= 59be05303, ses=3DGridJobSessionImpl [ses=3DGridTaskSessionImpl [taskName=3D= o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, dep=3DLocalDepl= oyment [super=3DGridDeployment [ts=3D1453807336443, depMode=3DSHARED, clsLd= r=3Dsun.misc.Launcher$AppClassLoader@15db9742, clsLdrId=3D46f5bad7251-9f7af= 4ba-6a64-4de4-b5d2-81d59be05303, userVer=3D0, loc=3Dtrue, sampleClsName=3Dj= ava.lang.String, pendingUndeploy=3Dfalse, undeployed=3Dfalse, usage=3D0]], = taskClsName=3Do.a.i.i.processors.cache.GridCacheAdapter$LoadCacheClosure, s= esId=3De9f5bad7251-1edbab1e-37bf-424e-a9e1-0c866b95009d, startTime=3D145380= 7336874, endTime=3D9223372036854775807, taskNodeId=3D1edbab1e-37bf-424e-a9e= 1-0c866b95009d, clsLdr=3Dsun.misc.Launcher$AppClassLoader@15db9742, closed= =3Dfalse, cpSpi=3Dnull, failSpi=3Dnull, loadSpi=3Dnull, usage=3D1, fullSup= =3Dfalse, subjId=3D1edbab1e-37bf-424e-a9e1-0c866b95009d, mapFut=3DIgniteFut= ure [orig=3DGridFutureAdapter [resFlag=3D0, res=3Dnull, startTime=3D1453807= 336894, endTime=3D0, ignoreInterrupts=3Dfalse, lsnr=3Dnull, state=3DINIT]]]= , jobId=3D0af5bad7251-9f7af4ba-6a64-4de4-b5d2-81d59be05303]] > java.lang.AssertionError: persistent-cache > at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCache= Closure.call(GridCacheAdapter.java:5788) > at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCache= Closure.call(GridCacheAdapter.java:5740) > at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.= execute(GridClosureProcessor.java:1789) > at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJob= Worker.java:509) > at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUti= ls.java:6397) > at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJ= obWorker.java:503) > at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWo= rker.java:456) > at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:= 110) > at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobE= xecuteRequest(GridJobProcessor.java:1166) > at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutio= nListener.onMessage(GridJobProcessor.java:1770) > at org.apache.ignite.internal.managers.communication.GridIoManager.proces= sRegularMessage0(GridIoManager.java:821) > at org.apache.ignite.internal.managers.communication.GridIoManager.access= $1600(GridIoManager.java:103) > at org.apache.ignite.internal.managers.communication.GridIoManager$5.run(= GridIoManager.java:784) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j= ava:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.= java:617) > at java.lang.Thread.run(Thread.java:745) > 9320 [Thread-19] INFO GridCacheProcessor - Started cache [name=3Dpersiste= nt-cache, mode=3DREPLICATED] > {noformat} > For reference, here's the code that configures the cache: > {noformat} > CacheConfiguration config =3D new CacheConfiguration<>("persistent-= cache"); > config.setCacheMode(CacheMode.REPLICATED); > config.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); > config.setRebalanceMode(CacheRebalanceMode.SYNC); > config.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYN= C); > config.setStartSize(1024); > config.setCacheStoreFactory(new LocalCacheStoreFactory(somepath)); > config.setWriteThrough(true); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)