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

Commit

Permalink
feat(split): register child partition (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong authored Apr 24, 2020
1 parent 275c3ce commit bfabb1c
Show file tree
Hide file tree
Showing 20 changed files with 1,057 additions and 7 deletions.
1 change: 1 addition & 0 deletions include/dsn/dist/replication/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ MAKE_EVENT_CODE_RPC(RPC_CM_DUPLICATION_SYNC, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_UPDATE_APP_ENV, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_DDD_DIAGNOSE, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_APP_PARTITION_SPLIT, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_REGISTER_CHILD_REPLICA, TASK_PRIORITY_COMMON)
#undef CURRENT_THREAD_POOL

#define CURRENT_THREAD_POOL THREAD_POOL_META_STATE
Expand Down
1 change: 1 addition & 0 deletions include/dsn/dist/replication/replication_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ENUM_REG(replication::config_type::CT_REMOVE)
ENUM_REG(replication::config_type::CT_ADD_SECONDARY_FOR_LB)
ENUM_REG(replication::config_type::CT_PRIMARY_FORCE_UPDATE_BALLOT)
ENUM_REG(replication::config_type::CT_DROP_PARTITION)
ENUM_REG(replication::config_type::CT_REGISTER_CHILD)
ENUM_END2(replication::config_type::type, config_type)

ENUM_BEGIN2(replication::node_status::type, node_status, replication::node_status::NS_INVALID)
Expand Down
141 changes: 140 additions & 1 deletion include/dsn/dist/replication/replication_types.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions include/dsn/utility/error_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,6 @@ DEFINE_ERR_CODE(ERR_IGNORE_BAD_DATA)
DEFINE_ERR_CODE(ERR_APP_DROPPED)
DEFINE_ERR_CODE(ERR_MOCK_INTERNAL)
DEFINE_ERR_CODE(ERR_ZOOKEEPER_OPERATION)
DEFINE_ERR_CODE(ERR_CHILD_REGISTERED)

} // namespace dsn
2 changes: 2 additions & 0 deletions src/dist/replication/common/replication_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class replication_options
void sanity_check();
};

typedef rpc_holder<register_child_request, register_child_response> register_child_rpc;

extern const char *partition_status_to_string(partition_status::type status);

class cold_backup_constant
Expand Down
Loading

0 comments on commit bfabb1c

Please sign in to comment.