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

Support arena rpc pb message factory #2751

Merged
merged 3 commits into from
Sep 8, 2024

Conversation

chenBright
Copy link
Contributor

@chenBright chenBright commented Sep 1, 2024

What problem does this PR solve?

Issue Number: resolve #535

Problem Summary:

What is changed and the side effects?

Changed:

  1. 目前bRPC已经不支持pb 2.x,没有了兼容性方面的顾虑,所以在Support rpc protobuf message factory interface #2718 的基础上支持pb3 arena机制即可。
  2. HTTP协议支持RpcPBMessageFactory。

Side effects:

  • Performance effects(性能影响):

  • 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.(请遵循贡献者准则).

docs/en/server.md Outdated Show resolved Hide resolved
@wwbmmm
Copy link
Contributor

wwbmmm commented Sep 3, 2024

LGTM

@zyearn zyearn merged commit 9643150 into apache:master Sep 8, 2024
20 checks passed
@chenBright chenBright deleted the arena_pb_factory branch September 8, 2024 16:23
@sikey647
Copy link

有遇到过,这样设置之后,只要有流量,内存一致上涨OOM的情况吗
rpc_options.rpc_pb_message_factory = brpc::GetArenaRpcPBMessageFactory<1024, 128 * 1024>();

@chenBright
Copy link
Contributor Author

@sikey647 试试#2798

@sikey647
Copy link

@sikey647试试#2798

@chenBright 哦,看着应该可以了。 昨天看代码排查时候,感觉可能是arena直接放入对象池导致的,后来直接改成new/delete验证了下,看着是ok的。上午按你给的pr更新了下,目前观察看着是ok的

@chenBright
Copy link
Contributor Author

@sikey647 #2798 已经合入了,可以更新一下master使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持pb3的arena分配
5 participants