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

[GitHub] [incubator-pegasus] acelyc111 opened a new pull request, #1359: refactor(conf): use DSN_DEFINE_uint64 to load uint64 type of configs

acelyc111 opened a new pull request, #1359:
URL: https://github.com/apache/incubator-pegasus/pull/1359

   https://github.com/apache/incubator-pegasus/issues/1323
   
   This patch refactors the code to use `DSN_DEFINE_uint64` instead of `dsn_config_get_value_uint64` to load uint64 type of configurations, and doesn't introduce any functional changes.
   - all default value and most of description are kept as before
   - move the defination of flags closer to the places where they're used


-- 
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


[GitHub] [incubator-pegasus] levy5307 merged pull request #1359: refactor(conf): use DSN_DEFINE_uint64 to load uint64 type of configs

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 merged PR #1359:
URL: https://github.com/apache/incubator-pegasus/pull/1359


-- 
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


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

Posted by "empiredan (via GitHub)" <gi...@apache.org>.
empiredan commented on code in PR #1359:
URL: https://github.com/apache/incubator-pegasus/pull/1359#discussion_r1115751804


##########
src/server/pegasus_server_impl.h:
##########
@@ -349,11 +352,12 @@ class pegasus_server_impl : public pegasus_read_service
 
     bool is_multi_get_abnormal(uint64_t time_used, uint64_t size, uint64_t iterate_count)
     {
-        if (_abnormal_multi_get_size_threshold && size >= _abnormal_multi_get_size_threshold) {
+        if (FLAGS_rocksdb_abnormal_multi_get_size_threshold &&

Review Comment:
   ```suggestion
           if (FLAGS_rocksdb_abnormal_multi_get_size_threshold > 0 &&
   ```



-- 
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


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

Posted by "empiredan (via GitHub)" <gi...@apache.org>.
empiredan commented on code in PR #1359:
URL: https://github.com/apache/incubator-pegasus/pull/1359#discussion_r1115473938


##########
src/meta/test/meta_app_operation_test.cpp:
##########
@@ -32,9 +32,10 @@
 namespace dsn {
 namespace replication {
 
-DSN_DECLARE_uint64(min_live_node_count_for_unfreeze);
-DSN_DECLARE_int32(min_allowed_replica_count);
 DSN_DECLARE_int32(max_allowed_replica_count);
+DSN_DECLARE_int32(min_allowed_replica_count);
+DSN_DECLARE_uint64(min_live_node_count_for_unfreeze);
+DSN_DECLARE_uint64(node_live_percentage_threshold_for_update);

Review Comment:
   ```suggestion
   ```



##########
src/test/bench_test/benchmark.cpp:
##########
@@ -76,8 +85,8 @@ void benchmark::run_benchmark(int thread_count, operation_type op_type)
     // create thread args for each thread, and run them
     std::vector<std::shared_ptr<thread_arg>> args;
     for (int i = 0; i < thread_count; i++) {
-        args.push_back(
-            std::make_shared<thread_arg>(i + config::instance().seed, hist_stats, method, this));
+        args.push_back(std::make_shared<thread_arg>(
+            i + FLAGS_benchmark_seed == 0 ? 1000 : FLAGS_benchmark_seed, hist_stats, method, this));

Review Comment:
   ```suggestion
           args.push_back(std::make_shared<thread_arg>(
               i + (FLAGS_benchmark_seed == 0 ? 1000 : FLAGS_benchmark_seed), hist_stats, method, this));
   ```



##########
src/server/pegasus_server_impl.h:
##########
@@ -349,11 +352,12 @@ class pegasus_server_impl : public pegasus_read_service
 
     bool is_multi_get_abnormal(uint64_t time_used, uint64_t size, uint64_t iterate_count)
     {
-        if (_abnormal_multi_get_size_threshold && size >= _abnormal_multi_get_size_threshold) {
+        if (FLAGS_rocksdb_abnormal_multi_get_size_threshold &&
+            size >= FLAGS_rocksdb_abnormal_multi_get_size_threshold) {
             return true;
         }
-        if (_abnormal_multi_get_iterate_count_threshold &&
-            iterate_count >= _abnormal_multi_get_iterate_count_threshold) {
+        if (FLAGS_rocksdb_abnormal_multi_get_iterate_count_threshold &&

Review Comment:
   ```suggestion
           if (FLAGS_rocksdb_abnormal_multi_get_iterate_count_threshold > 0 &&
   ```



##########
src/server/pegasus_server_impl.h:
##########
@@ -382,7 +386,8 @@ class pegasus_server_impl : public pegasus_read_service
 
     bool is_get_abnormal(uint64_t time_used, uint64_t value_size)
     {
-        if (_abnormal_get_size_threshold && value_size >= _abnormal_get_size_threshold) {
+        if (FLAGS_rocksdb_abnormal_get_size_threshold &&

Review Comment:
   ```suggestion
           if (FLAGS_rocksdb_abnormal_get_size_threshold > 0 &&
   ```



##########
src/server/pegasus_server_impl_init.cpp:
##########
@@ -294,54 +329,22 @@ pegasus_server_impl::pegasus_server_impl(dsn::replication::replica *r)
                                   "rocksdb_use_direct_io_for_flush_and_compaction",
                                   false,
                                   "rocksdb options.use_direct_io_for_flush_and_compaction");
-
-    // TODO(yingchun): size_t, uint64_t
-    _db_opts.compaction_readahead_size =
-        dsn_config_get_value_uint64("pegasus.server",
-                                    "rocksdb_compaction_readahead_size",
-                                    2 * 1024 * 1024,
-                                    "rocksdb options.compaction_readahead_size");
-    // TODO(yingchun): size_t, uint64_t
-    _db_opts.writable_file_max_buffer_size =

Review Comment:
   Does `_db_opts.writable_file_max_buffer_size` need to be assigned ?



-- 
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