acelyc111 commented on code in PR #1875:
URL: 
https://github.com/apache/incubator-pegasus/pull/1875#discussion_r1479588594


##########
src/nfs/nfs_server_impl.cpp:
##########
@@ -261,26 +259,11 @@ void nfs_service_impl::register_cli_commands()
 {
     static std::once_flag flag;
     std::call_once(flag, [&]() {
-        _nfs_max_send_rate_megabytes_cmd = 
dsn::command_manager::instance().register_command(
-            {"nfs.max_send_rate_megabytes_per_disk"},
-            "nfs.max_send_rate_megabytes_per_disk [num]",
-            "control the max rate(MB/s) for one disk to send file to remote 
node",
-            [](const std::vector<std::string> &args) {
-                std::string result("OK");
-
-                if (args.empty()) {
-                    return 
std::to_string(FLAGS_max_send_rate_megabytes_per_disk);
-                }
-
-                int32_t max_send_rate_megabytes = 0;
-                if (!dsn::buf2int32(args[0], max_send_rate_megabytes) ||
-                    max_send_rate_megabytes <= 0) {
-                    return std::string("ERR: invalid arguments");
-                }
-
-                FLAGS_max_send_rate_megabytes_per_disk = 
max_send_rate_megabytes;
-                return result;
-            });
+        _nfs_max_send_rate_megabytes_cmd = 
dsn::command_manager::instance().register_int_command(

Review Comment:
   It's not needed. 0 (or less than 0) means disable flow control, and 0 is the 
default value.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to