You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bigtop.apache.org by "Evans Ye (JIRA)" <ji...@apache.org> on 2017/09/20 15:32:01 UTC

[jira] [Comment Edited] (BIGTOP-2887) ZOO_DATADIR_AUTOCREATE_DISABLE is always set

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

Evans Ye edited comment on BIGTOP-2887 at 9/20/17 3:31 PM:
-----------------------------------------------------------

Enable autocreation may cause serious problem in Production.
According to ZK's [doc|https://zookeeper.apache.org/doc/r3.5.0-alpha/zookeeperAdmin.html#Disabling+data+directory+autocreation]:
{quote}
Disabling data directory autocreation
New in 3.5: The default behavior of a ZooKeeper server is to automatically create the data directory (specified in the configuration file) when started if that directory does not already exist. This can be inconvenient and even dangerous in some cases. Take the case where a configuration change is made to a running server, wherein the dataDir parameter is accidentally changed. When the ZooKeeper server is restarted it will create this non-existent directory and begin serving - with an empty znode namespace. This scenario can result in an effective "split brain" situation (i.e. data in both the new invalid directory and the original valid data store). As such is would be good to have an option to turn off this autocreate behavior. In general for production environments this should be done, unfortunately however the default legacy behavior cannot be changed at this point and therefore this must be done on a case by case basis. This is left to users and to packagers of ZooKeeper distributions.
{quote}

May I know the driver? Why you need autocreation?


was (Author: evans_ye):
Enable autocreation may cause serious problem in Production.
According to ZK's doc:
{quote}
Disabling data directory autocreation
New in 3.5: The default behavior of a ZooKeeper server is to automatically create the data directory (specified in the configuration file) when started if that directory does not already exist. This can be inconvenient and even dangerous in some cases. Take the case where a configuration change is made to a running server, wherein the dataDir parameter is accidentally changed. When the ZooKeeper server is restarted it will create this non-existent directory and begin serving - with an empty znode namespace. This scenario can result in an effective "split brain" situation (i.e. data in both the new invalid directory and the original valid data store). As such is would be good to have an option to turn off this autocreate behavior. In general for production environments this should be done, unfortunately however the default legacy behavior cannot be changed at this point and therefore this must be done on a case by case basis. This is left to users and to packagers of ZooKeeper distributions.
{quote}

May I know the driver? Why you need autocreation?

> ZOO_DATADIR_AUTOCREATE_DISABLE is always set
> --------------------------------------------
>
>                 Key: BIGTOP-2887
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-2887
>             Project: Bigtop
>          Issue Type: Bug
>            Reporter: Abraham Fine
>
> We should not set a default value of true here. if the user does not set this value, we should leave it blank so the data directory can be created by zookeeper's start up scripts. 



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