You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/22 02:36:20 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #21125: Optimize routing of broadcast table to reuse cached connections as possible

TeslaCN opened a new issue, #21125:
URL: https://github.com/apache/shardingsphere/issues/21125

   ## Feature Request
   
   ### Problems with the current broadcast table
   In a transaction, the request to query the broadcast table alone will be randomly routed to multiple different data sources, which increases the number of connections occupied by the transaction and the transaction execution delay.
   
   ![image](https://user-images.githubusercontent.com/20503072/191645654-dd6f4e2f-226d-4e66-b3e7-ed6def09a341.png)
   
   
   ### Root cause
   The kernel does not know which data source connections have been cached by the connection manager, so there is no guarantee that the next broadcast table or other unicast statements can reuse the cached connection.
   
   Related codes:
   https://github.com/apache/shardingsphere/blob/dbac9a8cd313120393d122847e42fa6f8fb89dce/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java#L106-L108
   
   ### Idea
   Provide ShardingUnicastRoutingEngine with preferred data source names. Passed to ShardingUnicastRoutingEngine via ConnectionContext.
   
   ![image](https://user-images.githubusercontent.com/20503072/191645665-6c6599a5-38d3-40a0-ba33-adb5e6b9742d.png)
   
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] strongduanmu closed issue #21125: Optimize routing of broadcast table to reuse cached connections as possible

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #21125: Optimize routing of broadcast table to reuse cached connections as possible
URL: https://github.com/apache/shardingsphere/issues/21125


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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