natehuangting commented on code in PR #21207:
URL: https://github.com/apache/shardingsphere/pull/21207#discussion_r1005111777


##########
shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java:
##########
@@ -307,7 +307,9 @@ private ResultSet executeFederationQuery(final QueryContext 
queryContext) throws
     }
     
     private DriverExecutionPrepareEngine<JDBCExecutionUnit, Connection> 
createDriverExecutionPrepareEngine() {
-        int maxConnectionsSizePerQuery = 
metaDataContexts.getMetaData().getProps().<Integer>getValue(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY);
+        int maxConnectionsSizePerQuery = connection.isHoldTransaction()

Review Comment:
   @I-Love-China 
   In the ss design, local does not guarantee any features. If you need to 
ensure transactionality, I think you need to develop some functions yourself. 
For example, if multiple data sources are of the same instance, you can use 
only one connection, and it is forbidden to perform cross-shard queries in 
transactions (I don't think it is necessary to perform a large batch of queries 
in a transaction, because you can already determine what shards you want to 
update, which needs to be acceptable to your business). If your data is small, 
you can also consider loading all into memory.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to