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

Registry polaris #1147

Merged
merged 14 commits into from
Mar 7, 2022
Merged

Registry polaris #1147

merged 14 commits into from
Mar 7, 2022

Conversation

ZLBer
Copy link
Contributor

@ZLBer ZLBer commented Dec 16, 2021

Motivation:

add a new registry component polaris , the project website : https://github.com/polarismesh/polaris , https://polarismesh.cn/#/
related issue: polarismesh/polaris#163

Modification:

add a new registry component polaris, the code logic is similar to consul registry.

Result:

Fixes #1141 .

@sofastack-bot
Copy link

sofastack-bot bot commented Dec 16, 2021

Hi @ZLBer, welcome to SOFAStack community, Please sign Contributor License Agreement!

After you signed CLA, we will automatically sync the status of this pull request in 3 minutes.

@sofastack-bot sofastack-bot bot added cla:no Need sign CLA First-time contributor First-time contributor size/XXL labels Dec 16, 2021
@seeflood
Copy link
Member

ZLB niu b!

1 similar comment
@OrezzerO
Copy link
Contributor

ZLB niu b!

@sofastack-bot sofastack-bot bot added cla:yes CLA is ok and removed cla:no Need sign CLA labels Dec 16, 2021
Copy link
Member

@ujjboy ujjboy left a comment

Choose a reason for hiding this comment

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

感谢 PR,我看目前是有一个示例,这个能否补充一个单测呢?

@ZLBer
Copy link
Contributor Author

ZLBer commented Dec 17, 2021

感谢 PR,我看目前是有一个示例,这个能否补充一个单测呢?

单测在 registry/registry-polaris/src/test/java/com/alipay/sofa/rpc/registry/polaris/PolarisRegistryTest.java

@EvenLjj
Copy link
Collaborator

EvenLjj commented Dec 20, 2021

@ZLBer Welcome, build fail in PMD check. The detail info [INFO] PMD Failure: com.alipay.sofa.rpc.registry.polaris.PolarisRegistry:204 Rule:UnusedLocalVariable Priority:3 Avoid unused local variables such as 'response'... Please remove the unusedLocalVariable and run again.

@ZLBer
Copy link
Contributor Author

ZLBer commented Dec 20, 2021

@EvenLjj done~

@EvenLjj
Copy link
Collaborator

EvenLjj commented Dec 21, 2021

@ZLBer Please run mvn clean compile -DskipTests in local before git commit. It will format the code.
image

@ZLBer
Copy link
Contributor Author

ZLBer commented Dec 21, 2021

@EvenLjj sorry,formatted it

@codecov
Copy link

codecov bot commented Dec 21, 2021

Codecov Report

Merging #1147 (a4bbd7d) into master (0c84e0a) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1147      +/-   ##
============================================
+ Coverage     71.08%   71.12%   +0.03%     
- Complexity      825      826       +1     
============================================
  Files           407      407              
  Lines         17199    17199              
  Branches       2681     2681              
============================================
+ Hits          12226    12232       +6     
+ Misses         3597     3589       -8     
- Partials       1376     1378       +2     
Impacted Files Coverage Δ
.../com/alipay/sofa/rpc/context/RpcInvokeContext.java 81.48% <0.00%> (-0.93%) ⬇️
...java/com/alipay/sofa/rpc/module/LookoutModule.java 85.71% <0.00%> (+33.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c84e0a...a4bbd7d. Read the comment docs.

@chuntaojun
Copy link

hello。这里sofa-rpc社区的同学能辛苦在帮忙review看看吗

@EvenLjj
Copy link
Collaborator

EvenLjj commented Jan 20, 2022

@ZLBer @chuntaojun Sorry for the delay, we will review as soon as possible. If there is no problem with the review, this will release in a rpc feature release version.

Copy link
Collaborator

@EvenLjj EvenLjj left a comment

Choose a reason for hiding this comment

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

LGTM

@chuntaojun
Copy link

希望可以快点合并到sofa-rpc仓库主分支中去~

@EvenLjj EvenLjj added this to the 5.8.4 milestone Mar 2, 2022
@nobodyiam nobodyiam requested a review from ujjboy March 7, 2022 01:38
@ujjboy
Copy link
Member

ujjboy commented Mar 7, 2022

代码没啥问题啦, 合并后请在这边补充一下文档。

https://github.com/sofastack/sofastack.tech/tree/master/content/zh/projects/sofa-rpc

@EvenLjj EvenLjj merged commit 76d26c5 into sofastack:master Mar 7, 2022
Copy link
Contributor

@OrezzerO OrezzerO left a comment

Choose a reason for hiding this comment

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

Some bug need to be fixed.

getAllInstancesRequest.setNamespace(nameSpace);
getAllInstancesRequest.setService(serviceName);
this.currentData = consumerAPI.getAllInstance(getAllInstancesRequest);
this.watchExecutor = Executors.newSingleThreadScheduledExecutor();
Copy link
Contributor

Choose a reason for hiding this comment

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

It's too expensive that each consumer holds a thread.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OrezzerO so, should exceute them in one threadPool ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes CLA is ok First-time contributor First-time contributor size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new registry component polaris
6 participants