You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by ji...@apache.org on 2022/03/30 03:43:50 UTC

[incubator-pegasus] branch duplication_dev updated: refactor(dup_enhancement#24): delete useless `freezed` argument (#935)

This is an automated email from the ASF dual-hosted git repository.

jiashuo pushed a commit to branch duplication_dev
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/duplication_dev by this push:
     new 248148a  refactor(dup_enhancement#24): delete useless `freezed` argument (#935)
248148a is described below

commit 248148a2423371de649620e9ff464c60d33000ba
Author: Jiashuo <js...@live.com>
AuthorDate: Wed Mar 30 11:43:44 2022 +0800

    refactor(dup_enhancement#24): delete useless `freezed` argument (#935)
---
 rdsn                               |  2 +-
 src/shell/commands/duplication.cpp | 18 ++++--------------
 src/shell/main.cpp                 |  3 +--
 3 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/rdsn b/rdsn
index 2be6eba..ea92106 160000
--- a/rdsn
+++ b/rdsn
@@ -1 +1 @@
-Subproject commit 2be6eba9ab4cdbcfb1f3202bff9782a0c5bdf7f7
+Subproject commit ea9210614ac5cac42cd3f8b8e1aedd68981b37de
diff --git a/src/shell/commands/duplication.cpp b/src/shell/commands/duplication.cpp
index 3119be4..862f4c3 100644
--- a/src/shell/commands/duplication.cpp
+++ b/src/shell/commands/duplication.cpp
@@ -38,12 +38,6 @@ bool add_dup(command_executor *e, shell_context *sc, arguments args)
         fmt::print(stderr, "too many params\n");
         return false;
     }
-    for (const auto &flag : cmd.flags()) {
-        if (flag != "f" && flag != "freeze") {
-            fmt::print(stderr, "unknown flag {}\n", flag);
-            return false;
-        }
-    }
 
     if (!cmd(1)) {
         fmt::print(stderr, "missing param <app_name>\n");
@@ -63,9 +57,7 @@ bool add_dup(command_executor *e, shell_context *sc, arguments args)
         return true;
     }
 
-    bool freeze = cmd[{"-f", "--freeze"}];
-
-    auto err_resp = sc->ddl_client->add_dup(app_name, remote_cluster_name, freeze);
+    auto err_resp = sc->ddl_client->add_dup(app_name, remote_cluster_name);
     dsn::error_s err = err_resp.get_error();
     std::string hint;
     if (err.is_ok()) {
@@ -74,10 +66,9 @@ bool add_dup(command_executor *e, shell_context *sc, arguments args)
     }
     if (!err.is_ok()) {
         fmt::print(stderr,
-                   "adding duplication failed [app: {}, remote: {}, freeze: {}, error: {}]\n",
+                   "adding duplication failed [app: {}, remote: {}, error: {}]\n",
                    app_name,
                    remote_cluster_name,
-                   freeze,
                    err.description());
         if (!hint.empty()) {
             fmt::print(stderr, "detail:\n  {}\n", hint);
@@ -85,12 +76,11 @@ bool add_dup(command_executor *e, shell_context *sc, arguments args)
     } else {
         const auto &resp = err_resp.get_value();
         fmt::print("adding duplication succeed [app: {}, remote: {}, appid: {}, dupid: "
-                   "{}, freeze: {}]\n",
+                   "{}]\n",
                    app_name,
                    remote_cluster_name,
                    resp.appid,
-                   resp.dupid,
-                   freeze);
+                   resp.dupid);
     }
     return true;
 }
diff --git a/src/shell/main.cpp b/src/shell/main.cpp
index 974bd08..3330971 100644
--- a/src/shell/main.cpp
+++ b/src/shell/main.cpp
@@ -449,8 +449,7 @@ static command_executor commands[] = {
         "[-s|--skip_prompt] [-o|--output file_name]",
         ddd_diagnose,
     },
-    // todo(jiashuo1) [-f|--freezed] is Deprecated, it will be removed later
-    {"add_dup", "add duplication", "<app_name> <remote_cluster_name> [-f|--freezed]", add_dup},
+    {"add_dup", "add duplication", "<app_name> <remote_cluster_name>", add_dup},
     {"query_dup", "query duplication info", "<app_name> [-d|--detail]", query_dup},
     {"remove_dup", "remove duplication", "<app_name> <dup_id>", remove_dup},
     {"start_dup", "start duplication", "<app_name> <dup_id>", start_dup},

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