imzhenyu / rDSN

Robust Distributed System Nucleus (rDSN) is an open framework for quickly building and managing high performance and robust distributed systems.
MIT License
33 stars 11 forks source link

fix some bugs in rpc #497

Closed qinzuoyan closed 8 years ago

qinzuoyan commented 8 years ago

including:

for the last one, because the old logic is to use response_task->set_delay() to delay recalling, but it is not a good way, because even if the retry rpc succeed, it also need delay 1 second.

qinzuoyan commented 8 years ago

@imzhenyu , these are bugs found by kill_test, please review it.

qinzuoyan commented 8 years ago

@imzhenyu , fixed according to your review.

imzhenyu commented 8 years ago

@qinzuoyan Thanks, seems that there is a compilation error on windows though in replica_config.cpp.

qinzuoyan commented 8 years ago

I see, but I don'n know why compile failed.

On Thu, Jul 28, 2016 at 5:19 PM, Zhenyu Guo notifications@github.com wrote:

@qinzuoyan https://github.com/qinzuoyan Thanks, seems that there is a compilation error on windows though in replica_config.cpp.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imzhenyu/rDSN/pull/497#issuecomment-235843561, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgQPdPJnViVEGXEShQvvfxGqIvMmDATks5qaHQSgaJpZM4JW8NK .

imzhenyu commented 8 years ago

Let me have a try then.

qinzuoyan commented 8 years ago

Can you help to fix it on windows? I don't have the windows compile env. Thanks.

On Thu, Jul 28, 2016 at 5:19 PM, Zhenyu Guo notifications@github.com wrote:

@qinzuoyan https://github.com/qinzuoyan Thanks, seems that there is a compilation error on windows though in replica_config.cpp.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imzhenyu/rDSN/pull/497#issuecomment-235843561, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgQPdPJnViVEGXEShQvvfxGqIvMmDATks5qaHQSgaJpZM4JW8NK .

imzhenyu commented 8 years ago

Sure, working on it now.

imzhenyu commented 8 years ago

should remove the other std::move(xxx), seems that a further move-capture is not supported yet.

[this, req2](error_code err, dsn_message_t request, dsn_message_t response)
{
  on_update_configuration_on_meta_server_reply(err, request, response, std::move(req2));
},
qinzuoyan commented 8 years ago

or:

[this, req3 = std::move(req2)](error_code err, dsn_message_t request, dsn_message_t response)
{
    on_update_configuration_on_meta_server_reply(err, request, response, req3);
},

I am trying it.