-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: change the way to call replication_ddl_client::set_app_envs #398
Conversation
auto err_resp = sc->ddl_client->set_app_envs(sc->current_app_name, keys, values); | ||
dsn::error_s err = err_resp.get_error(); | ||
std::string hint_msg; | ||
if (err.is_ok()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err is ok, 这个听起来太奇怪了. 建议改成err_code之类的. 而且response的error和response的信息里的error, 可以从命名上区分的更清楚些
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要改就改 error_s 的名字。这个在 rocksdb 叫 Status::isOK,在 rust 叫 Result::is_ok,最后其实就是一个写法的问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在就专注于这里的表述就好了, 变量名改好就足够了. is_ok()这个没有什么问题, 我上面没表述清楚
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我也觉得改就改errors_s的名字最好,单纯从类型和变量名来看,err这个变量起的其实没什么问题,你上面说的err is ok奇怪说起来还是error_s::is_ok()的问题,改变量也改变不了什么
What problem does this PR solve?
Change the way to call set_app_replication_ddl_client::set_app_envs, becasue the return of this method is changed
What is changed and how it works?
the calling of set_app_replication_ddl_client::set_app_envs is changed
Check List
Tests
yes