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(loadbalancer): merge function buildWeightedVirtualNodes into buildVirtualNodes #343

Merged
merged 6 commits into from Mar 18, 2022

Conversation

f20500909
Copy link
Contributor

@f20500909 f20500909 commented Feb 13, 2022

What type of PR is this?

refactor

What this PR does / why we need it (English/Chinese):

EN: Merge BuildWeightedVirtualNodes function into buildVirtualNodes function, become one big function. Delete duplicate code, make it easier to maintain and enhance.

ZH:将buildWeightedVirtualNodes 函数合入buildVirtualNodes函数中,成为一个函数。因为两者的重复代码太多,不利于后续维护。

Which issue(s) this PR fixes:

None

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor Author

@f20500909 f20500909 left a comment

Choose a reason for hiding this comment

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

点错了,不小心点了review

Copy link
Member

@PureWhiteWu PureWhiteWu left a comment

Choose a reason for hiding this comment

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

Good job!
有一个小问题需要改下,避免被混淆。

pkg/loadbalance/consist.go Outdated Show resolved Hide resolved
@lsjbd lsjbd merged commit 657b9e9 into cloudwego:develop Mar 18, 2022
lsjbd added a commit that referenced this pull request Mar 24, 2022
* define not found instance error.

* define ErrInstanceNotFound at kerrors.

* tuning err msg for no instance.

* refactor:replace additional atomic operations

* fix:solving the concurrency problem of Hooks.

* optimize: adjust minMaxIdleTimeout to 2s

* optimize: lbcache is global, it doesn't need register ProbeFunc for diagnosis

* docs: update readme with new blog

* chore:upgrade choleraehyq/pid for Go 1.18

* fix(client): fix oneway seqid and lower loss rate (#363)

* optimize: use instance tag instead of remoteinfo tag firstly (#374)

* fix: combine services (#367)

* fix(tool): fix import of protobuf combineservice (#359)

* refactor(loadbalancer): merge function buildWeightedVirtualNodes into buildVirtualNodes (#343)

* refactor(loadbalancer): merge function buildWeightedVirtualNodes into buildVirtualNodes

* Fix readme blog link

* fix(generic): detect circular thrift IDL dependency (#383)

* chore: update version v0.2.1

Co-authored-by: horizonzy <horizonzy@apache.org>
Co-authored-by: dongzeXD <l65775622@gmail.com>
Co-authored-by: dongze <43315356+dongzeXD@users.noreply.github.com>
Co-authored-by: YangruiEmma <yangr.emma@gmail.com>
Co-authored-by: Joway <wangzhuowei@bytedance.com>
Co-authored-by: luoguangming.ivan <luoguangming.ivan@bytedance.com>
Co-authored-by: YangruiEmma <yangrui.emma@bytedance.com>
Co-authored-by: HeyJavaBean <imlehr@163.com>
Co-authored-by: lsjbd <44455379+lsjbd@users.noreply.github.com>
Co-authored-by: Anthony-Dong <fanhaodong516@gmail.com>
Co-authored-by: Simon Wang <jellalleonhardt4869@gmail.com>
Co-authored-by: 王恒 <33808231+f20500909@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants