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/07/15 05:59:03 UTC

[GitHub] [shardingsphere] FlyingZC opened a new pull request, #19197: Fix alter local transaction rule

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

   Fix alter local transaction rule.
   
   Changes proposed in this pull request:
   - Fix alter local transaction rule without TYPE param;
   - TransactionRule does not need to modify the databases;
   - Create empty `ShardingSphereTransactionManagerEngine` may occured NPE when 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


[GitHub] [shardingsphere] jingshanglu merged pull request #19197: Fix alter local transaction rule

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


-- 
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 pull request #19197: Fix alter local transaction rule

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on PR #19197:
URL: https://github.com/apache/shardingsphere/pull/19197#issuecomment-1185214023

   For second change item:
   The caller must handle the `database` param itself, and the caller has already handled the database itself, such as removing or adding
   The caller of the method `addResource` is as follows:
   <img width="1597" alt="image" src="https://user-images.githubusercontent.com/19788130/179161430-310c7b27-3da5-4e4e-93f4-73fee21fdefc.png">
   <img width="1466" alt="image" src="https://user-images.githubusercontent.com/19788130/179162010-16822a29-1fb7-4326-a328-b57cc938e149.png">
   The caller has already added `database` itself.
   
   The caller of the method `org.apache.shardingsphere.transaction.rule.TransactionRule#closeStaleResource(java.lang.String)` is as follows:
   <img width="1462" alt="image" src="https://user-images.githubusercontent.com/19788130/179162211-f54fd13a-03f0-47a0-a1c7-e0be6f082a3b.png">
   The caller has already removed `database` itself.
   
   The caller of the method `org.apache.shardingsphere.transaction.rule.TransactionRule#closeStaleResource()` is as follows:
   <img width="1551" alt="image" src="https://user-images.githubusercontent.com/19788130/179162407-17f9f606-dab3-4032-9630-be9f876b9053.png">
   The caller has already closed and rebuilt the `TransactionRule`,so we needn't to handle the `database`.
   


-- 
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 pull request #19197: Fix alter local transaction rule

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on PR #19197:
URL: https://github.com/apache/shardingsphere/pull/19197#issuecomment-1185216554

   For third change item:
   When we create empty `ShardingSphereTransactionManagerEngine`,the param of `xaTransactionManagerProvider` in `XAShardingSphereTransactionManager` is also be empty.So I need to determine whether it is null.
   <img width="1168" alt="image" src="https://user-images.githubusercontent.com/19788130/179163223-ae040a6e-4492-4695-9db2-1ba2b0b9a1b5.png">
   <img width="566" alt="image" src="https://user-images.githubusercontent.com/19788130/179163260-8cf65629-3c64-4f4b-8626-0b1dc5239d89.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