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/05/24 08:04:12 UTC

[GitHub] [shardingsphere] jingshanglu opened a new pull request, #17904: Fix autocommit

jingshanglu opened a new pull request, #17904:
URL: https://github.com/apache/shardingsphere/pull/17904

   Fixes #16894 .
   
   Changes proposed in this pull request:
   - When `autocommit=0`, transactions will be automatically started only when SQL is not a `TCLStatement`
   
   ### Test
   
   - [x] Manual
   


-- 
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] TeslaCN commented on a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r880402139


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   But the current progress of Vert.x driver is pending. We can merge this PR for now.



-- 
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] TeslaCN commented on a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r880399202


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   `BackendConnectionException` is used for decoupling codes from JDBC.



-- 
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] jingshanglu commented on a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r880299125


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   I don't think it's necessary to use `BackendConnectionException` to wrap all of them. It's necessary to handle `BackendConnectionException ` where other calls are caused. In fact, it's `SQLException`.



-- 
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 a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r881084270


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   > But the current progress of Vert.x driver is pending. We can merge this PR for now.
   
   Thank you.



-- 
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] jingshanglu commented on a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r880299678


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   @TeslaCN PTAL



-- 
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 a diff in pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904#discussion_r880280021


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/JDBCBackendConnection.java:
##########
@@ -175,16 +175,12 @@ public void unmarkResourceInUse(final JDBCDatabaseCommunicationEngine databaseCo
     }
     
     @Override
-    public Void prepareForTaskExecution() throws BackendConnectionException {
+    public Void prepareForTaskExecution() throws SQLException {

Review Comment:
   Why change BackendConnectionException to SQLException?



-- 
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 merged pull request #17904: Fix autocommit

Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #17904:
URL: https://github.com/apache/shardingsphere/pull/17904


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