Commit 778e15ed authored by gejun's avatar gejun

Pass full options to the _schan inside DynamicPartitionChannel

parent a79eeb57
...@@ -82,7 +82,6 @@ static void* sender(void* arg) { ...@@ -82,7 +82,6 @@ static void* sender(void* arg) {
} else { } else {
CHECK(brpc::IsAskedToQuit() || !FLAGS_dont_fail) CHECK(brpc::IsAskedToQuit() || !FLAGS_dont_fail)
<< "error=" << cntl.ErrorText() << " latency=" << cntl.latency_us(); << "error=" << cntl.ErrorText() << " latency=" << cntl.latency_us();
CHECK_LT(cntl.latency_us(), 5000);
// We can't connect to the server, sleep a while. Notice that this // We can't connect to the server, sleep a while. Notice that this
// is a specific sleeping to prevent this thread from spinning too // is a specific sleeping to prevent this thread from spinning too
// fast. You should continue the business logic in a production // fast. You should continue the business logic in a production
......
...@@ -83,7 +83,6 @@ static void* sender(void* arg) { ...@@ -83,7 +83,6 @@ static void* sender(void* arg) {
} else { } else {
CHECK(brpc::IsAskedToQuit() || !FLAGS_dont_fail) CHECK(brpc::IsAskedToQuit() || !FLAGS_dont_fail)
<< "error=" << cntl.ErrorText() << " latency=" << cntl.latency_us(); << "error=" << cntl.ErrorText() << " latency=" << cntl.latency_us();
CHECK_LT(cntl.latency_us(), 5000);
// We can't connect to the server, sleep a while. Notice that this // We can't connect to the server, sleep a while. Notice that this
// is a specific sleeping to prevent this thread from spinning too // is a specific sleeping to prevent this thread from spinning too
// fast. You should continue the business logic in a production // fast. You should continue the business logic in a production
......
...@@ -457,9 +457,7 @@ int DynamicPartitionChannel::Init( ...@@ -457,9 +457,7 @@ int DynamicPartitionChannel::Init(
LOG(ERROR) << "Fail to get NamingServiceThread"; LOG(ERROR) << "Fail to get NamingServiceThread";
return -1; return -1;
} }
ChannelOptions schan_options; if (_schan.Init("_dynpart", options_in) != 0) {
schan_options.succeed_without_server = ns_opt.succeed_without_server;
if (_schan.Init("_dynpart", &schan_options) != 0) {
LOG(ERROR) << "Fail to init _schan"; LOG(ERROR) << "Fail to init _schan";
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment