Github user enixon commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/120#discussion_r91234951
--- Diff:
src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java ---
@@ -132,6 +137,9 @@ public FileTxnSnapLog(File dataDir, File snapDir)
throws IOException {
txnLog = new FileTxnLog(this.dataDir);
snapLog = new FileSnap(this.snapDir);
+
+ autoCreateDB =
Boolean.parseBoolean(System.getProperty(ZOOKEEPER_DB_AUTOCREATE,
--- End diff --
I included `ZOOKEEPER_DB_AUTOCREATE` to allow users to opt out of the
feature until they're ready to update their ensemble management tooling to
support creating the new file. Is that in accord with Zookeeper style?
On the question of style, `ZOOKEEPER_DB_AUTOCREATE_DEFAULT` exists purely
because `ZOOKEEPER_DATADIR_AUTOCREATE_DEFAULT` exists above it in the file. If
including the defaults as static constants isn't Zookeeper style then I'm happy
to replace it with a string literal in the constructor.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---