Skip to content
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

Merged
merged 8 commits into from
Sep 24, 2019
Merged

refactor: change the way to call replication_ddl_client::set_app_envs #398

merged 8 commits into from
Sep 24, 2019

Conversation

levy5307
Copy link
Contributor

@levy5307 levy5307 commented Sep 23, 2019

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

  • Unit test
    yes

@levy5307 levy5307 changed the title table level slow query feat: change the way to call replication_ddl_client::set_app_envs Sep 23, 2019
neverchanje
neverchanje previously approved these changes Sep 23, 2019
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()) {
Copy link
Contributor

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, 可以从命名上区分的更清楚些

Copy link
Contributor

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,最后其实就是一个写法的问题。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在就专注于这里的表述就好了, 变量名改好就足够了. is_ok()这个没有什么问题, 我上面没表述清楚

Copy link
Contributor Author

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()的问题,改变量也改变不了什么

@neverchanje neverchanje changed the title feat: change the way to call replication_ddl_client::set_app_envs refactor: change the way to call replication_ddl_client::set_app_envs Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants