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

brpc加redis cluster支持 #2228

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jiangdongzi
Copy link

What problem does this PR solve?

Issue Number:

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects(性能影响):
    none
  • Breaking backward compatibility(向后兼容性):

Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

@jiangdongzi
Copy link
Author

jiangdongzi commented Apr 28, 2023

@wwbmmm @chenBright 我自己测试通过了, 实现moved, 和slot路由, 还没实现asking, 可以帮忙提些意见
我自己觉得可以改的地方是不需要EMOVED这个错误码, 直接检测到moved错误, 在redis_protocol.cc中直接IssueRpc就行, 但是需要把对应的类设置为Controller的 friend
实现思路就是实现一个redis_cluster_naming_service 来执行 CLUSTER SLOTS 提取对应的信息, 通过tag传给consitent_hashing_load_balancer, 实现一个新的redis_cluster_replica_policy, hash与slot一一对应.

move的实现定义一个 _tmp_single_server_id, 本次当作SingleServer, 设置完对应的peer_id后, 即把_tmp_single_server_id置为无效

@chenBright
Copy link
Contributor

可以提供一下设计思路和使用方法吗?

@chenBright chenBright added the feature new feature label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants