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 2021/09/24 06:58:16 UTC

[GitHub] [shardingsphere] marker-wu opened a new issue #12677: Question about the transaction of sharding-proxy

marker-wu opened a new issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677


   When I use the demo program to connect to the sharding-proxy, my transaction type is LOCAL. My demo program inserted two pieces of data into the database and was routed to a different database. Finally, I rolled back the transaction and found that the data in the two databases were both Rolled back, why can the local transaction roll back the data of the two databases?
   Isn't this in the category of distributed transactions?
   ![image](https://user-images.githubusercontent.com/45256940/134631539-cf71f4c0-3b1c-4604-b7c0-539c705a0794.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] marker-wu commented on issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
marker-wu commented on issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677#issuecomment-926443259


   > @marker-wu Whether to use Local transaction is determined by your scenario. If you only perform table sharding or you can ensure that the tables of related businesses are in the same database, then using Local transactions can work.
   > 
   > If these conditions cannot be guaranteed, then you need consider XA or BASE.
   
   OK


-- 
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] marker-wu commented on issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
marker-wu commented on issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677#issuecomment-926435078


   
   > > Do you mean that LOCAL transaction is also one of the supported distributed transactions?
   > 
   > The LOCAL will try committing or rolling back all connections, it just acts on multiple data sources, I don't think it is distributed.
   
   The sub-database sub-table I understand is also a scenario in distributed transactions. LOCAL controls the commit or rollback of all connections in the entire transaction, but it cannot guarantee final consistency
   
   According to what you mean, what is the application scenario of XA and BASE in sharding-proxy?


-- 
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 issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

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


   > Do you mean that LOCAL transaction is also one of the supported distributed transactions?
   
   The LOCAL will try committing or rolling back all connections, it just acts on multiple data sources, I don't think it is distributed.


-- 
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] marker-wu edited a comment on issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
marker-wu edited a comment on issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677#issuecomment-926420872


   > The LOCAL transaction will commit or rollback all connections used in a transaction. Data may be inconsistent if any connections commit or rollback failed.
   
   Do you mean that LOCAL transaction is also one of the supported distributed transactions?


-- 
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 #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

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


   @marker-wu Whether to use Local transaction is determined by your scenario. If you only perform table sharding or you can ensure that the tables of related businesses are in the same database, then using Local transactions can work. 
   
   If these conditions cannot be guaranteed, then you need consider XA or BASE.


-- 
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 edited a comment on issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
TeslaCN edited a comment on issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677#issuecomment-926408222


   The LOCAL transaction will commit or rollback all connections used in a transaction. Data may be inconsistent if any connections commit or rollback failed.


-- 
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 issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

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


   The LOCAL transaction will commit or rollback all connections used in a transaction.


-- 
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] marker-wu closed issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
marker-wu closed issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677


   


-- 
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 #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

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


   @marker-wu Can you close this issue?


-- 
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] marker-wu commented on issue #12677: Question about the transaction of sharding-proxy in 5.0.0-beta

Posted by GitBox <gi...@apache.org>.
marker-wu commented on issue #12677:
URL: https://github.com/apache/shardingsphere/issues/12677#issuecomment-926420872


   > The LOCAL transaction will commit or rollback all connections used in a transaction. Data may be inconsistent if any connections commit or rollback failed.
   
   Do you mean that LOCAL transactions are also one of the supported distributed transactions?


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