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

Michi Mutsuzaki commented on ZOOKEEPER-1502:
--------------------------------------------

+0

I can go either way on this one. If we decide to add this feature, we should:

1. document zookeeper.datadir.lock configuration parameter.
2. consider Ted's suggestion of using PID to detect stale lock files.
3. move the info logs to debug. I think most of the info messages should be 
debug, except for maybe this one:

{noformat}
+            LOG.info("Data directory {} is not locked, please protect from 
external access!",
+                    root);
{noformat}

Let's wait for a week or two to hear from other people.

> Prevent multiple zookeeper servers from using the same data directory
> ---------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1502
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1502
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.4.3
>            Reporter: Will Johnson
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1502.patch
>
>
> We recently ran into an issue where two zookeepers servers which were a part 
> of two separate quorums were configured to use the same data directory.  
> Interestingly, the zookeeper servers did not seem to complain and both seemed 
> to work fine until one of them was restarted.  Once that happened all sort of 
> chaos ensued.  I understand that this is a misconfiguration should zookeeper 
> complain about this or do users need to protect themselves in some external 
> fashion?  Is a simple file lock enough or are there other things I should 
> take into consideration if it’s up to me to handle?  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to