[jira] [Commented] (ZOOKEEPER-2195) fsync.warningthresholdms in zoo.cfg not working
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188376#comment-15188376 ] Dmitry Ryabkov commented on ZOOKEEPER-2195: --- Sure. I'll look into this. > fsync.warningthresholdms in zoo.cfg not working > --- > > Key: ZOOKEEPER-2195 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2195 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.6, 3.5.0 >Reporter: David Fan >Assignee: Biju Nair >Priority: Trivial > Attachments: ZOOKEEPER-2195-DOC.patch, ZOOKEEPER-2195.patch > > > Config fsync.warningthresholdms in zoo.cfg does not work. > I find QuorumPeerConfig.parseProperties give fsync.warningthresholdms a > prefix like "zookeeper.fsync.warningthresholdms". But in class FileTxnLog > where fsync.warningthresholdms is used, code is > :Long.getLong("fsync.warningthresholdms", 1000),without prefix "zookeeper.", > therefore can not get fsync.warningthresholdms's value. > I wonder the speed of fsync, need this config to see whether the speed is > good enough. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2195) fsync.warningthresholdms in zoo.cfg not working
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15181928#comment-15181928 ] Dmitry Ryabkov commented on ZOOKEEPER-2195: --- [~gsbiju] Looks fine to me, as long as you don't modify the config file property name (which I think you don't). The config file property names get "zookeeper." appended in front of them in http://svn.apache.org/repos/asf/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java, parseProperties() method and then set as system properties. Now with these two patches everything looks in sync to me. > fsync.warningthresholdms in zoo.cfg not working > --- > > Key: ZOOKEEPER-2195 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2195 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.6, 3.5.0 >Reporter: David Fan >Assignee: Biju Nair >Priority: Trivial > Attachments: ZOOKEEPER-2195-DOC.patch, ZOOKEEPER-2195.patch > > > Config fsync.warningthresholdms in zoo.cfg does not work. > I find QuorumPeerConfig.parseProperties give fsync.warningthresholdms a > prefix like "zookeeper.fsync.warningthresholdms". But in class FileTxnLog > where fsync.warningthresholdms is used, code is > :Long.getLong("fsync.warningthresholdms", 1000),without prefix "zookeeper.", > therefore can not get fsync.warningthresholdms's value. > I wonder the speed of fsync, need this config to see whether the speed is > good enough. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2195) fsync.warningthresholdms in zoo.cfg not working
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15180658#comment-15180658 ] Dmitry Ryabkov commented on ZOOKEEPER-2195: --- The Findbugs concern seems to be valid, but it is completely unrelated to my change. It is in ZooKeeper client code in org.apache.zookeeper.client.ZooKeeperSaslClient. As for the tests, as I said when submitting the patch this is just a syntax error fix, and it is in the code which is difficult to have tests for (static filed with its value set by a static initializer) without some refactoring. Refactoring this code for the sake of testing the fix for the property name string value is possible for sure, but I felt like that'd be overkill. > fsync.warningthresholdms in zoo.cfg not working > --- > > Key: ZOOKEEPER-2195 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2195 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.6, 3.5.0 >Reporter: David Fan >Assignee: Biju Nair >Priority: Trivial > Attachments: ZOOKEEPER-2195.patch > > > Config fsync.warningthresholdms in zoo.cfg does not work. > I find QuorumPeerConfig.parseProperties give fsync.warningthresholdms a > prefix like "zookeeper.fsync.warningthresholdms". But in class FileTxnLog > where fsync.warningthresholdms is used, code is > :Long.getLong("fsync.warningthresholdms", 1000),without prefix "zookeeper.", > therefore can not get fsync.warningthresholdms's value. > I wonder the speed of fsync, need this config to see whether the speed is > good enough. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (ZOOKEEPER-2195) fsync.warningthresholdms in zoo.cfg not working
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmitry Ryabkov updated ZOOKEEPER-2195: -- Attachment: ZOOKEEPER-2195.patch Here is the patch for this bug. It is really just a syntax error fix in the property name. > fsync.warningthresholdms in zoo.cfg not working > --- > > Key: ZOOKEEPER-2195 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2195 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.6, 3.5.0 >Reporter: David Fan >Assignee: Biju Nair >Priority: Trivial > Attachments: ZOOKEEPER-2195.patch > > > Config fsync.warningthresholdms in zoo.cfg does not work. > I find QuorumPeerConfig.parseProperties give fsync.warningthresholdms a > prefix like "zookeeper.fsync.warningthresholdms". But in class FileTxnLog > where fsync.warningthresholdms is used, code is > :Long.getLong("fsync.warningthresholdms", 1000),without prefix "zookeeper.", > therefore can not get fsync.warningthresholdms's value. > I wonder the speed of fsync, need this config to see whether the speed is > good enough. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2376) Server fails to start if there is a zero-length TxnLog file present in the log directory
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15167788#comment-15167788 ] Dmitry Ryabkov commented on ZOOKEEPER-2376: --- One of the possible fixes would be to model FileTxnLog after FileSnap which skips over the "broken" files in its deserialize() method. > Server fails to start if there is a zero-length TxnLog file present in the > log directory > > > Key: ZOOKEEPER-2376 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2376 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6 > Environment: Windows >Reporter: Dmitry Ryabkov > > If there is an empty TxnLog file in the log file folder, ZooKeeper server > fails to start. This is the exception it logs: > 2015-11-02 07:41:10.479 -0600 (,,,) main : ERROR > org.apache.zookeeper.server.ZooKeeperServerMain - Unexpected exception, > exiting abnormally > java.io.EOFException > at java.io.DataInputStream.readInt(DataInputStream.java:392) > at > org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63) > at > org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:64) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:576) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:595) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:561) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:643) > at > org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:158) > at > org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223) > at > org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272) > at > org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399) > at > org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122) > at > org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:113) > at > org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86) > at > org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78) > Zero-length log file can be created if FileTxnLog.append() crashes after it > creates FileOutputStream but before it serializes and flushes the header. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2376) Server fails to start if there is a zero-length TxnLog file present in the log directory
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15167745#comment-15167745 ] Dmitry Ryabkov commented on ZOOKEEPER-2376: --- In v3.4.6 the corresponding code which can create the zero-length file is in FileTxnLog.java, lines 205 - 211. If line 205 is executed but the process crashes or exits with an exception before executing line 211 a txn log file without a header is created. > Server fails to start if there is a zero-length TxnLog file present in the > log directory > > > Key: ZOOKEEPER-2376 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2376 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6 > Environment: Windows >Reporter: Dmitry Ryabkov > > If there is an empty TxnLog file in the log file folder, ZooKeeper server > fails to start. This is the exception it logs: > 2015-11-02 07:41:10.479 -0600 (,,,) main : ERROR > org.apache.zookeeper.server.ZooKeeperServerMain - Unexpected exception, > exiting abnormally > java.io.EOFException > at java.io.DataInputStream.readInt(DataInputStream.java:392) > at > org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63) > at > org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:64) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:576) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:595) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:561) > at > org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:643) > at > org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:158) > at > org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223) > at > org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272) > at > org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399) > at > org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122) > at > org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:113) > at > org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86) > at > org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116) > at > org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78) > Zero-length log file can be created if FileTxnLog.append() crashes after it > creates FileOutputStream but before it serializes and flushes the header. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (ZOOKEEPER-2376) Server fails to start if there is a zero-length TxnLog file present in the log directory
Dmitry Ryabkov created ZOOKEEPER-2376: - Summary: Server fails to start if there is a zero-length TxnLog file present in the log directory Key: ZOOKEEPER-2376 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2376 Project: ZooKeeper Issue Type: Bug Components: server Affects Versions: 3.4.6 Environment: Windows Reporter: Dmitry Ryabkov If there is an empty TxnLog file in the log file folder, ZooKeeper server fails to start. This is the exception it logs: 2015-11-02 07:41:10.479 -0600 (,,,) main : ERROR org.apache.zookeeper.server.ZooKeeperServerMain - Unexpected exception, exiting abnormally java.io.EOFException at java.io.DataInputStream.readInt(DataInputStream.java:392) at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63) at org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:64) at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:576) at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:595) at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:561) at org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:643) at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:158) at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223) at org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272) at org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399) at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122) at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:113) at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86) at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78) Zero-length log file can be created if FileTxnLog.append() crashes after it creates FileOutputStream but before it serializes and flushes the header. -- This message was sent by Atlassian JIRA (v6.3.4#6332)