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

meta_service & server_state: support set/del/clear envs for app #13

Merged
merged 4 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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