52coder
52coder
**Describe the bug (描述bug)** 基于example中的例子验证可选熔断(根据失败率) 原始代码:https://github.com/52coder/incubator-brpc/tree/master/example/asynchronous_echo_c%2B%2B client.cpp修改点: https://github.com/52coder/incubator-brpc/blob/master/example/asynchronous_echo_c%2B%2B/client.cpp#L65 添加: options.enable_circuit_breaker = true; L30行修改为rr : DEFINE_string(load_balancer, "rr", "The algorithm for load balancing"); server.cpp在改动前,先编译出来echo_server,然后在https://github.com/52coder/incubator-brpc/blob/master/example/asynchronous_echo_c%2B%2B/server.cpp#L63前面增加如下代码: cntl->SetFailed(brpc::EREQUEST, "Fail to parse request");然后编译出二进制echo_server_fail,这里的想法是生成一个100%失败的server触发熔断。 **To Reproduce (复现方法)**...
[root@centos-linux-10 cprimer]# ./Sale_item 0-201-70353-X 4 24.99 0-201-70353-X 5 24.99 0-201-70354-X 1 24.99 0-201-70353-X 4 99.96 24.99 occurs 2 times 0-201-70353-X 1 24.99 0-201-70354-X 1 24.99 24.99 occurs 1 times If...
I found two bugs and tried to fix them. Since the author does not maintain this project, if there is a problem, please add an issue in my project, I...