Pavel Tupitsyn created IGNITE-6322:
--------------------------------------

             Summary: NPE after removing persistent store directory
                 Key: IGNITE-6322
                 URL: https://issues.apache.org/jira/browse/IGNITE-6322
             Project: Ignite
          Issue Type: Bug
          Components: persistence
    Affects Versions: 2.1
            Reporter: Pavel Tupitsyn
             Fix For: 2.3


* Start a node with persistence enabled
* Create a cache and put some value there
* Stop the node
* Remove {{PersistentStorePath}} directory (something like 
{{db/0_0_0_0_0_0_0_1_127_0_0_1_172_25_4_191_2001_0_9d38_6abd_14f4_1849_53e6_fb40_47500}}),
 but not {{wal}}
* Start the node again, NPE is thrown:

{code}
java.lang.NullPointerException
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.applyUpdate(GridCacheDatabaseSharedManager.java:1620)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.applyLastUpdates(GridCacheDatabaseSharedManager.java:1492)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.restoreState(GridCacheDatabaseSharedManager.java:929)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.beforeExchange(GridCacheDatabaseSharedManager.java:733)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:994)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:632)
    at 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
    at 
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
    at java.lang.Thread.run(Thread.java:745)
Sep 08, 2017 6:34:22 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to wait for completion of partition map exchange (preloading 
will not start): GridDhtPartitionsExchangeFuture [dummy=false, 
forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent 
[customMsg=null, affTopVer=AffinityTopologyVersion [topVer=1, minorTopVer=1], 
super=DiscoveryEvent [evtNode=TcpDiscoveryNode 
[id=9c7c703e-756c-4fc0-856b-332682dc35b4, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 
172.25.4.191, 2001:0:9d38:6abd:1c51:c5b:53e6:fb40], 
sockAddrs=[/172.25.4.191:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, 
/2001:0:9d38:6abd:1c51:c5b:53e6:fb40:47500], discPort=47500, order=1, 
intOrder=1, lastExchangeTime=1504884859750, loc=true, 
ver=2.1.0#20170720-sha1:a6ca5c8a, isClient=false], topVer=1, nodeId8=9c7c703e, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1504884861351]], 
crd=TcpDiscoveryNode [id=9c7c703e-756c-4fc0-856b-332682dc35b4, 
addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 172.25.4.191, 
2001:0:9d38:6abd:1c51:c5b:53e6:fb40], sockAddrs=[/172.25.4.191:47500, 
/0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, 
/2001:0:9d38:6abd:1c51:c5b:53e6:fb40:47500], discPort=47500, order=1, 
intOrder=1, lastExchangeTime=1504884859750, loc=true, 
ver=2.1.0#20170720-sha1:a6ca5c8a, isClient=false], 
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1, 
minorTopVer=1], nodeId=9c7c703e, evt=DISCOVERY_CUSTOM_EVT], added=true, 
initFut=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=false, 
hash=134836679], init=false, lastVer=null, partReleaseFut=GridCompoundFuture 
[rdc=null, initFlag=1, lsnrCalls=4, done=true, cancelled=false, err=null, 
futs=[true, true, true, true]], exchActions=null, affChangeMsg=null, 
skipPreload=false, clientOnlyExchange=false, initTs=1504884861361, 
centralizedAff=false, changeGlobalStateE=null, forcedRebFut=null, done=true, 
evtLatch=0, remaining=[], super=GridFutureAdapter [ignoreInterrupts=false, 
state=DONE, res=java.lang.NullPointerException, hash=1269205424]]
class org.apache.ignite.IgniteCheckedException: null
    at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7229)
    at 
org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:258)
    at 
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:206)
    at 
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:158)
    at 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1911)
    at 
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.applyUpdate(GridCacheDatabaseSharedManager.java:1620)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.applyLastUpdates(GridCacheDatabaseSharedManager.java:1492)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.restoreState(GridCacheDatabaseSharedManager.java:929)
    at 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.beforeExchange(GridCacheDatabaseSharedManager.java:733)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:994)
    at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:632)
    at 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
    ... 2 more
{code}

Exception should clearly indicate that persisted data has been corrupted.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to