bmahler commented on code in PR #469:
URL: https://github.com/apache/mesos/pull/469#discussion_r1457883287


##########
src/log/leveldb.cpp:
##########
@@ -156,7 +158,10 @@ static string encode(uint64_t position, bool adjust = true)
 LevelDBStorage::LevelDBStorage()
   : db(nullptr), first(None())
 {
-  // Nothing to see here.
+  Option<string> disableAutoCompactVar = 
os::getenv("MESOS_LOG_AUTO_COMPACT_DISABLED");
+  if (autoCompactVar.isSome() && autoCompactVar.get() == "1") {
+    autoCompact = false;
+  }

Review Comment:
   the names don't line up anymore? we can use getOrElse here too:
   
   ```suggestion
     // We provide an escape hatch in case some users experience issues
     // with auto-compaction. This is currently only available as an environment
     // variable since it's easier than exposing a flag up through the JNI 
layer.
     Option<string> disable = os::getenv("MESOS_LOG_AUTO_COMPACT_DISABLED");
     if (disable.getOrElse("0") == "1") {
       autoCompact = false;
     }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to