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

Commit

Permalink
meta_service & server_state: support set/del/clear envs for app (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoveHeat authored and qinzuoyan committed Apr 17, 2018
1 parent c0669da commit 576de17
Show file tree
Hide file tree
Showing 14 changed files with 1,059 additions and 3 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 @@ -95,6 +95,7 @@ MAKE_EVENT_CODE(LPC_META_CALLBACK, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_QUERY_PN_DECREE, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_REPORT_RESTORE_STATUS, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_QUERY_RESTORE_STATUS, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_UPDATE_APP_ENV, TASK_PRIORITY_COMMON)
#undef CURRENT_THREAD_POOL

#define CURRENT_THREAD_POOL THREAD_POOL_META_STATE
Expand Down
2 changes: 2 additions & 0 deletions include/dsn/dist/replication/replication.types.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,7 @@ namespace dsn { namespace replication {
GENERATED_TYPE_SERIALIZATION(configuration_report_restore_status_response, THRIFT)
GENERATED_TYPE_SERIALIZATION(configuration_query_restore_request, THRIFT)
GENERATED_TYPE_SERIALIZATION(configuration_query_restore_response, THRIFT)
GENERATED_TYPE_SERIALIZATION(configuration_update_app_env_request, THRIFT)
GENERATED_TYPE_SERIALIZATION(configuration_update_app_env_response, THRIFT)

} }
10 changes: 10 additions & 0 deletions include/dsn/dist/replication/replication_ddl_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ class replication_ddl_client : public clientlet
int32_t backup_history_count_to_keep = 0,
const std::string &start_time = std::string());

dsn::error_code set_app_envs(const std::string &app_name,
const std::vector<std::string> &keys,
const std::vector<std::string> &values);
dsn::error_code del_app_envs(const std::string &app_name, const std::vector<std::string> &keys);
// precondition:
// -- if clear_all = true, just ignore prefix
// -- if clear_all = false, then prefix must not be empty
dsn::error_code
clear_app_envs(const std::string &app_name, bool clear_all, const std::string &prefix);

private:
bool static valid_app_char(int c);

Expand Down
149 changes: 149 additions & 0 deletions include/dsn/dist/replication/replication_types.h

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

Loading

0 comments on commit 576de17

Please sign in to comment.