Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
refactor: don't resend message if it is rejected by server (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 authored Jan 11, 2021
1 parent 34df5b3 commit ec34633
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client/partition_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void partition_resolver::call_task(const rpc_response_task_ptr &t)
dsn::error_code err, dsn::message_ex * req, dsn::message_ex * resp)
{
if (req->header->gpid.value() != 0 && err != ERR_OK && err != ERR_HANDLER_NOT_FOUND &&
err != ERR_APP_NOT_EXIST && err != ERR_OPERATION_DISABLED) {
err != ERR_APP_NOT_EXIST && err != ERR_OPERATION_DISABLED && err != ERR_BUSY) {
on_access_failure(req->header->gpid.get_partition_index(), err);
// still got time, retry
uint64_t nms = dsn_now_ms();
Expand Down
8 changes: 4 additions & 4 deletions src/common/duplication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
#include <dsn/utility/singleton.h>
#include <dsn/utils/time_utils.h>
#include <nlohmann/json.hpp>
#include <dsn/utility/flags.h>

namespace dsn {
namespace replication {
DSN_DEFINE_string("replication", cluster_name, "", "name of this cluster");

/*extern*/ const char *duplication_status_to_string(duplication_status::type status)
{
Expand All @@ -54,10 +56,8 @@ namespace replication {

/*extern*/ const char *get_current_cluster_name()
{
static const char *cluster_name =
dsn_config_get_value_string("replication", "cluster_name", "", "name of this cluster");
dassert(strlen(cluster_name) != 0, "cluster_name is not set");
return cluster_name;
dassert(strlen(FLAGS_cluster_name) != 0, "cluster_name is not set");
return FLAGS_cluster_name;
}

namespace internal {
Expand Down

0 comments on commit ec34633

Please sign in to comment.