Skip to content

Commit

Permalink
error style test
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jun 28, 2022
1 parent 1e822a6 commit 196f45c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
6 changes: 6 additions & 0 deletions rdsn/include/dsn/toollet/fault_injector.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ class fault_injector : public toollet
{
public:
explicit fault_injector(const char *name);






void install(service_spec &spec) override;
};
}
Expand Down
7 changes: 4 additions & 3 deletions rdsn/src/client/partition_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ namespace replication {
partition_resolver_ptr partition_resolver::get_resolver(const char *cluster_name,
const std::vector<rpc_address> &meta_list,
const char *app_name)
{
return partition_resolver_manager::instance().find_or_create(cluster_name, meta_list, app_name);
{return partition_resolver_manager::instance().find_or_create(cluster_name, meta_list, app_name);
}

DEFINE_TASK_CODE(LPC_RPC_DELAY_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_DEFAULT)

static inline bool error_retry(error_code err)
{


return (err != ERR_HANDLER_NOT_FOUND && err != ERR_APP_NOT_EXIST &&
err != ERR_OPERATION_DISABLED && err != ERR_BUSY && err != ERR_SPLITTING &&
err != ERR_DISK_INSUFFICIENT);
err != ERR_DISK_INSUFFICIENT);
}

void partition_resolver::call_task(const rpc_response_task_ptr &t)
Expand Down
9 changes: 7 additions & 2 deletions src/base/idl_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ inline std::string cas_check_type_to_string(dsn::apps::cas_check_type::type type
using namespace dsn::apps;
auto it = _cas_check_type_VALUES_TO_NAMES.find(type);
if (it == _cas_check_type_VALUES_TO_NAMES.end()) {
return std::string("INVALID=") + std::to_string(int(type));
}
return std::string("INVALID=") + std::to_string(int(type));}
return it->second;






}

inline bool cas_is_check_operand_needed(dsn::apps::cas_check_type::type type)
Expand Down
7 changes: 5 additions & 2 deletions src/base/value_schema_v0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ std::unique_ptr<value_field> value_schema_v0::extract_field(dsn::string_view val
case value_field_type::EXPIRE_TIMESTAMP:
field = extract_timestamp(value);
break;




default:
dassert_f(false, "Unsupported field type: {}", type);
}
dassert_f(false, "Unsupported field type: {}", type);}
return field;
}

Expand Down

0 comments on commit 196f45c

Please sign in to comment.