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

Michael Han commented on ZOOKEEPER-3056:
----------------------------------------

bq. The config `snapshot.trust.empty` works, I believe (note that naming is 
slightly different)

Yes, put the option name as *snapshot.trust.empty* (instead of 
*zookeeper.snapshot.trust.empty*) in the config file should generate a java 
system property named *zookeeper.snapshot.trust.empty* after ZK starts up. 
Though, I realized we had wrong documentation where we mentioned this is a java 
system property only (which it's not). i'll update doc soon.

bq. So unless there is some part of Zookeeper that puts all properties in 
config as system properties

Yes there actually is such code that generate java system property from (a 
subset of) configuration options parsed from cfg file. 

ZOOKEEPER-3644 is a real issue, I'll follow up there.


> Fails to load database with missing snapshot file but valid transaction log 
> file
> --------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3056
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3056
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.3, 3.5.4
>            Reporter: Michael Han
>            Assignee: Michael Han
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 3.6.0, 3.5.6
>
>         Attachments: snapshot.0
>
>          Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> [An 
> issue|https://lists.apache.org/thread.html/cc17af6ef05d42318f74148f1a704f16934d1253f1472cccc1a93b4b@%3Cdev.zookeeper.apache.org%3E]
>  was reported when a user failed to upgrade from 3.4.10 to 3.5.4 with missing 
> snapshot file.
> The code complains about missing snapshot file is 
> [here|https://github.com/apache/zookeeper/blob/release-3.5.4/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java#L206]
>  which is introduced as part of ZOOKEEPER-2325.
> With this check, ZK will not load the db without a snapshot file, even the 
> transaction log files are present and valid. This could be a problem for 
> restoring a ZK instance which does not have a snapshot file but have a sound 
> state (e.g. it crashes before being able to take the first snap shot with a 
> large snapCount parameter configured).
>  
> *how to use this fix*
> Add zookeeper.snapshot.trust.empty=true to your server configuration file and 
> start the server.
> This property will skip the check.
> It is recommended to remove the property once you have a working server, 
> because that check is important to ensure that the system is in good shape



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to