zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2967) Add check to validate dataDir and dataLogDir parameters at startup
Date Mon, 22 Jan 2018 14:39:04 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2967:
-------------------------------------------

Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/450#discussion_r162946062
  
    --- Diff: src/java/test/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java
---
    @@ -159,4 +159,222 @@ public void onTxnLoaded(TxnHeader hdr, Record rec) {
                 }
             }
         }
    +
    +    @Test
    +    public void testDirCheckWithCorrectFiles() throws IOException {
    +        File tmpDir = ClientBase.createEmptyTestDir();
    +        File logDir = new File(tmpDir, "logdir");
    +        File snapDir = new File(tmpDir, "snapdir");
    +        File logVersionDir = new File(logDir, FileTxnSnapLog.version +  FileTxnSnapLog.VERSION);
    +        File snapVersionDir = new File(snapDir, FileTxnSnapLog.version +  FileTxnSnapLog.VERSION);
    +
    +        if (!logVersionDir.exists()) {
    +            logVersionDir.mkdirs();
    +        }
    +        if (!snapVersionDir.exists()) {
    --- End diff --
    
    This is always true.


> Add check to validate dataDir and dataLogDir parameters at startup
> ------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2967
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2967
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.4.11
>            Reporter: Andor Molnar
>            Assignee: Mark Fenes
>            Priority: Major
>              Labels: startup, validation
>             Fix For: 3.5.4, 3.6.0, 3.4.12
>
>
> According to  -ZOOKEEPER-2960- we should at a startup check to validate that dataDir
and dataLogDir parameters are set correctly.
> Perhaps we should introduce a check of some kind? If datalogdir is different that datadir
and snapshots exist in datalogdir we throw an exception and quit.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message