You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "empiredan (via GitHub)" <gi...@apache.org> on 2023/02/27 05:50:28 UTC

[GitHub] [incubator-pegasus] empiredan commented on a diff in pull request #1363: refactor(conf): use DSN_DEFINE_bool to load bool type of configs

empiredan commented on code in PR #1363:
URL: https://github.com/apache/incubator-pegasus/pull/1363#discussion_r1118268377


##########
src/replica/storage/simple_kv/simple_kv.server.impl.cpp:
##########
@@ -37,22 +37,21 @@
 #include <fstream>
 #include <sstream>
 #include "utils/filesystem.h"
+#include "utils/flags.h"
 
 namespace dsn {
 namespace replication {
 namespace application {
 
+DSN_DEFINE_bool(test, test_file_learning, true, "");

Review Comment:
   `test_file_learning` is not found anywhere except config file, just drop it ?



##########
src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp:
##########
@@ -27,13 +27,16 @@
 #include <fstream>
 #include <sstream>
 #include "utils/filesystem.h"
+#include "utils/flags.h"
 
 #define VALUE_NOT_EXIST "<<not-exist>>"
 
 namespace dsn {
 namespace replication {
 namespace test {
 
+DSN_DECLARE_bool(test_file_learning);

Review Comment:
   The same.



##########
src/utils/simple_logger.cpp:
##########
@@ -40,7 +40,6 @@ namespace dsn {
 namespace tools {
 
 DSN_DEFINE_bool(tools.simple_logger, fast_flush, false, "whether to flush immediately");
-
 DSN_DEFINE_bool(tools.simple_logger,
                 short_header,

Review Comment:
   Add another `short_header` for `tools.screen_logger` ?



##########
src/replica/replica_stub.cpp:
##########
@@ -719,7 +752,7 @@ void replica_stub::initialize(const replication_options &opts, bool clear /* = f
     }
 
     // gc
-    if (false == _options.gc_disabled) {
+    if (false == FLAGS_gc_disabled) {

Review Comment:
   ```suggestion
       if (!FLAGS_gc_disabled) {
   ```



-- 
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: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org