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

dp_vs_wrr_schedule 算法错误 #872

Open
bu-hongwei opened this issue Feb 27, 2023 · 1 comment
Open

dp_vs_wrr_schedule 算法错误 #872

bu-hongwei opened this issue Feb 27, 2023 · 1 comment
Assignees
Labels
pr/not-a-bug the bug in the bugfix pr does not exist or reproduced

Comments

@bu-hongwei
Copy link

若果dests中rs为rs1(weight:2;no_overload);rs2(weight:1;no_overload)
dests->next=rs1;rs1->next == rs2;rs2->next=dests;
mark->di = 1;
mark->cw = 2
如果新建连接,负载均衡到rs1,mark->cl = r1; 然后rs1新建连接计数增加,rs1状态变换为overload。
再有新建连接过来,rs1状态无效,rs2权重较小全部忽略。
然后mark->cw-=mark->di;
rs1状态依旧无效;这样将触发if (mark->cl == p && mark->cw == mark->di) ,跳过对rs2的选择,导致无法获取rs。

@ywc689 ywc689 added the issue/to-solve issues await answers tobe solved label Apr 19, 2023
@ywc689 ywc689 self-assigned this Sep 27, 2023
@ywc689
Copy link
Collaborator

ywc689 commented Oct 10, 2023

if (mark->cl == p && mark->cw == mark->di) 这个终止条件包含两个约束:

  • 当前处理的节点 mark->cl 已经回到算法开始的初始节点 p
  • 当前的算法权重 mark->cw 已经到了最小权重 mark->di

这两个约束可以保证算法能选中最小权重的可用的RS。

@ywc689 ywc689 added pr/not-a-bug the bug in the bugfix pr does not exist or reproduced and removed issue/to-solve issues await answers tobe solved labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/not-a-bug the bug in the bugfix pr does not exist or reproduced
Projects
None yet
Development

No branches or pull requests

2 participants