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/10/10 06:31:33 UTC

[GitHub] [shardingsphere] I-Love-China opened a new issue, #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

I-Love-China opened a new issue, #21099:
URL: https://github.com/apache/shardingsphere/issues/21099

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   - 5.1.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   - ShardingSphere-JDBC
   
   ### Expected behavior
   - `DriverExecutionPrepareEngine` return one connection if statement in a local transaction
   
   ### Actual behavior
   - `DriverExecutionPrepareEngine` return more than one connection if max-connections-size-per-query greater than 1
   
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/41012300/191344372-c9791c3d-029d-4a82-bc0c-c3ec718997cf.png">
   
   
   ### Reason analyze (If you can)
   - Absence of LocalTransactionManager
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   #### Demo project
   - **repo url:** https://github.com/I-Love-China/shardingsphere
   - **branch:** `comment-global`
   - **main entry:** `org.apache.shardingsphere.shardingspheredemo.service.HealthRecordServiceTest#test`
   - **DDL:** https://github.com/I-Love-China/shardingsphere/blob/comment-global/shardingsphere-demo/src/main/resources/sql/DDL.sql
   - There will be a warning while running this unit test: `expected connections: 1, actual connections: 3`;
   
   
   ### Example codes for reproduce this issue (such as a github link).
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/41012300/191345237-99a8328b-1ea2-4834-a21e-f3df737ad8da.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] FlyingZC commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1254447211

   @strongduanmu I want to investigate the issue,please assign me.


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


[GitHub] [shardingsphere] I-Love-China commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
I-Love-China commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1290517984

   > Hi,@I-Love-China By the pr #21207. It guarantees that one transaction on a dataSource use the same connection, but may cause more memory consumption, because due to the limit of the number of connections, it may cause that streaming loading cannot be used, and memory loading is used.Do you have any better suggestion for modification.
   
   BTW, the default value of `max-connections-size-per-query` is 1.


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


[GitHub] [shardingsphere] I-Love-China commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
I-Love-China commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1290503348

   > #21207
   
   No, TRANSACTION is most important of all, one connection to one transaction is the expected behavior.
   @terrymanu Do you have any suggestions, boss ?


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


[GitHub] [shardingsphere] strongduanmu commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1254477220

   Assgined.


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


[GitHub] [shardingsphere] I-Love-China commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
I-Love-China commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1254602294

   BTW, there will be three identical connection in a distributed transaction context, is this okay, will all resources be closed properly ?
   
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/41012300/191677185-6f147879-041f-4640-9f80-9b29ec8aa69a.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

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


[GitHub] [shardingsphere] FlyingZC commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1254446558

   Thanks for your feedback,now only the same connection is used on the same data source in the same transaction in the XA transaction, even if multiple connections are configured by `max-connections-size-per-query`. But local transactions lack the relevant design and guarantees.


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


[GitHub] [shardingsphere] github-actions[bot] closed issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1
URL: https://github.com/apache/shardingsphere/issues/21099


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


[GitHub] [shardingsphere] FlyingZC commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1282315535

   Hi,@I-Love-China By the pr https://github.com/apache/shardingsphere/pull/21207. It guarantees that one transaction on a dataSource use the same connection, but may cause more memory consumption, because due to the limit of the number of connections, it may cause that streaming loading cannot be used, and memory loading is used.Do you have any better suggestion for modification.


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


[GitHub] [shardingsphere] github-actions[bot] commented on issue #21099: Local transaction will be broken while max-connections-size-per-query greater than 1

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #21099:
URL: https://github.com/apache/shardingsphere/issues/21099#issuecomment-1272348341

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


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