You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/12/05 09:08:26 UTC

[GitHub] [incubator-brpc] yockie opened a new issue #1300: Controller的_session_local_data在归还至pool之前可否先reset

yockie opened a new issue #1300:
URL: https://github.com/apache/incubator-brpc/issues/1300


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   据我周知,一次rpc结束(SendRpcResponse)会delete Controller(默认),在Controller的析构函数中,会将_session_local_data归还至server的_session_local_data_pool:
   _server->_session_local_data_pool->Return(_session_local_data);
   
   我现在遇到的问题是,我们的程序中_session_local_data每次使用会直接或间接的申请较大空间。根据打点显示,每次新的rpc进入service函数时对_session_local_data的reset的时间花费较大,影响整体平响。
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   如何在rpc结束后,_session_local_data规划至pool前,先做reset操作,避免reset时间占用新的rpc时间。
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   如果brpc框架不想做,能否提供自定义的接口让用户可以在rpc结束后做类似的清理工作。
   
   多谢!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1300: Controller的_session_local_data在归还至pool之前可否先reset

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1300:
URL: https://github.com/apache/incubator-brpc/issues/1300#issuecomment-739639402


   对reset操作做优化,比如尽量重用session_data申请的内存。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] jamesge commented on issue #1300: Controller的_session_local_data在归还至pool之前可否先reset

Posted by GitBox <gi...@apache.org>.
jamesge commented on issue #1300:
URL: https://github.com/apache/incubator-brpc/issues/1300#issuecomment-739658954


   @yockie 加好了 https://github.com/apache/incubator-brpc/commit/fb93753bc54666fb815ed2fe099b0a98a01ea61e#diff-161b7c02b8d6d08dfefa05ed880fbdc9df1cad1239c36fbc64cddf9e02deaebf 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit edited a comment on issue #1300: Controller的_session_local_data在归还至pool之前可否先reset

Posted by GitBox <gi...@apache.org>.
cdjingit edited a comment on issue #1300:
URL: https://github.com/apache/incubator-brpc/issues/1300#issuecomment-739639402


   对reset操作做优化,比如尽量重用session_data申请的内存。   
   不过你提的接口我认为也是合理的,我们讨论一下。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yockie commented on issue #1300: Controller的_session_local_data在归还至pool之前可否先reset

Posted by GitBox <gi...@apache.org>.
yockie commented on issue #1300:
URL: https://github.com/apache/incubator-brpc/issues/1300#issuecomment-739699418


   赞!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org