[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823356#comment-13823356
 ] 

Vinay commented on ZOOKEEPER-1813:
----------------------------------

Scenario :

1. There are so many nodes under /test/subdir1/subdir2
2. One node is created under /test/subdir2/subdir. here the zxid is say X;
3. Now snapshotting with zxid X. started due to reaching snapCount threshold.
4. Now before snapshot was still writing nodes under /test/subdir1/subdir2,
    children nodes under /test/subdir2/subdir are created and deleted. ( 
/test/subdir2/subdir/file)
    /test/subdir2/subdir also deleted.
5. When snapshot comes to write /test/subdir2 it will have no childs, same is 
stored in  snapshot.
6. Now if the Zk restarted while loading data tree, after loading snapshot, 
    there will be txn for create /test/subdir2/subdir/file, but there wont be 
parent node, because it was already missed from snapshot. And restart fails.

> Zookeeper restart fails due to missing node from snapshot
> ---------------------------------------------------------
>
>                 Key: ZOOKEEPER-1813
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1813
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.5, 3.5.0
>            Reporter: Vinay
>            Priority: Blocker
>
> Due to following exception Zookeeper restart is failing
> {noformat}java.io.IOException: Failed to process transaction type: 1 error: 
> KeeperErrorCode = NoNode for /test/subdir2/subdir2/subdir
>       at 
> org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:183)
>       at 
> org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:222)
>       at 
> org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:255)
>       at 
> org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:380)
>       at 
> org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:748)
>       at 
> org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:111)
>       at 
> org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:90)
>       at 
> org.apache.zookeeper.server.ZooKeeperServerMainTest$2.run(ZooKeeperServerMainTest.java:218)
> Caused by: org.apache.zookeeper.KeeperException$NoNodeException: 
> KeeperErrorCode = NoNode for /test/subdir2/subdir2/subdir
>       at 
> org.apache.zookeeper.server.persistence.FileTxnSnapLog.processTransaction(FileTxnSnapLog.java:268)
>       at 
> org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:181)
>       ... 7 more{noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to