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/08/03 11:52:06 UTC

[GitHub] [shardingsphere] peilinqian opened a new issue, #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally

peilinqian opened a new issue, #19840:
URL: https://github.com/apache/shardingsphere/issues/19840

   ## 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?
   we find java version: java8, full_version=1.8.0_282
   ShardingSphere-5.1.3-SNAPSHOT
   Commit ID: dirty-9dd0d3990c849d50c17c6dc7c92ec2d4ce0ad7e5
   Commit Message: Implements openGauss version function by calcite (#19327)
   Branch: 9dd0d3990c849d50c17c6dc7c92ec2d4ce0ad7e5
   Build time: 2022-08-02T17:55:17+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   In the XA-Narayana transaction type scenario,The transaction timeout parameter does take effect normally
   ### Actual behavior
   In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   1.  1 session excute
   create table t_order(user_id int,order_id int,order_name text);
   insert into t_order values(0,0,'ds0-0'),(0,1,'ds0-1'),(0,2,'ds0-2'),(1,0,'ds1-0'),(1,1,'ds1-1'),(1,2,'ds1-2');
   begin;
   update t_order set order_name ='ds0_0' where user_id = 0 and order_id =0;
   2. 1 session excute
   update t_order set order_name ='ds0_ _0' where user_id = 0 and order_id =0;
   
   
   **expect :step 2 timeout after 2min;
   actual:step 2 timeout after 50s, step1 is not active first** 
   
   **session1 result**
   **order_db=> begin;
   ```
   BEGIN
   order_db=> update t_order set order_name ='ds0_0' where user_id = 0 and order_id =0;
   UPDATE 1
   order_db=> end;
   ERROR:  ARJUNA016102: The transaction is not active! Uid is 0:ffff7f000001:9931:62ea597e:2c**
   ```
   **session2 result**
   ```
   order_db=> update t_order set order_name ='ds0_ _0' where user_id = 0 and order_id =0;
   UPDATE 1
   Time: 50933.694 ms
   ```
   
   
   **opengauss transaction timeout 2min**
   ```
   openGauss=# show lockwait_timeout;
    lockwait_timeout
   ------------------
    20min
   (1 row)
   openGauss=#
   openGauss=# show update_lockwait_timeout;
    update_lockwait_timeout
   -------------------------
    2min
   (1 row)
   openGauss=#
   openGauss=# show allow_concurrent_tuple_update;
    allow_concurrent_tuple_update
   -------------------------------
    on
   (1 row)
   ```
   
   **transaction timeout 300s**
   ```
   <properties>
      <entry key="CoordinatorEnvironmentBean.commitOnePhase">YES</entry>
      <entry key="ObjectStoreEnvironmentBean.transactionSync">ON</entry>
      <entry key="ObjectStoreEnvironmentBean.defaultTimeout">300</entry>
      <entry key="CoreEnvironmentBean.nodeIdentifier">1</entry>
      <entry key="JTAEnvironmentBean.xaRecoveryNodes">1</entry>
      <entry key="JTAEnvironmentBean.xaResourceOrphanFilterClassNames">
         com.arjuna.ats.internal.jta.recovery.arjunacore.JTATransactionLogXAResourceOrphanFilter
         com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter
         com.arjuna.ats.internal.jta.recovery.arjunacore.JTAActionStatusServiceXAResourceOrphanFilter
      </entry>
      <entry key="CoreEnvironmentBean.socketProcessIdPort">0</entry>
      <entry key="RecoveryEnvironmentBean.recoveryModuleClassNames">
         com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule
         com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule
      </entry>
      <entry key="RecoveryEnvironmentBean.expiryScannerClassNames">
         com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner
      </entry>
      <entry key="RecoveryEnvironmentBean.recoveryPort">4712</entry>
      <entry key="RecoveryEnvironmentBean.recoveryAddress"></entry>
      <entry key="RecoveryEnvironmentBean.transactionStatusManagerPort">0</entry>
      <entry key="RecoveryEnvironmentBean.transactionStatusManagerAddress"></entry>
      <entry key="RecoveryEnvironmentBean.recoveryListener">NO</entry>
      <entry key="RecoveryEnvironmentBean.recoveryBackoffPeriod">1</entry>
   </properties>
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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] peilinqian commented on issue #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally

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

   parameter configuration error;
   `   <entry key="ObjectStoreEnvironmentBean.defaultTimeout">300</entry>`
   The correct value is:
   `   <entry key="CoordinatorEnvironmentBean.defaultTimeout">300</entry>`
   
   
   Test Results :session 2 is first timeout
   ```
   order_db=> update t_order set order_name ='ds0_ _0' where user_id = 0 and order_id =0;
   ERROR:  Lock wait timeout: thread 139998864537344 on node dn_6001 waiting for ShareLock on transaction 57704 after 120000.131 ms
   DETAIL:  blocked by hold lock thread 139998904448768, statement <select * from t_order_0  UNION ALL select * from t_order_1 >, hold lockmode ExclusiveLock.
   ```
   


-- 
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] peilinqian commented on issue #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally

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

   [ERROR] 2022-08-03 19:59:03.756 [Connection-1-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   javax.transaction.RollbackException: ARJUNA016102: The transaction is not active! Uid is 0:ffff7f000001:9931:62ea597e:2c
           at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1285)
           at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:128)
           at org.apache.shardingsphere.transaction.xa.XAShardingSphereTransactionManager.commit(XAShardingSphereTransactionManager.java:108)
           at org.apache.shardingsphere.proxy.backend.communication.jdbc.transaction.JDBCBackendTransactionManager.commit(JDBCBackendTransactionManager.java:81)
           at org.apache.shardingsphere.proxy.backend.communication.jdbc.transaction.JDBCBackendTransactionManager.commit(JDBCBackendTransactionManager.java:39)
           at org.apache.shardingsphere.proxy.backend.text.transaction.TransactionBackendHandler.execute(TransactionBackendHandler.java:124)
           at org.apache.shardingsphere.proxy.frontend.opengauss.command.query.simple.OpenGaussComQueryExecutor.execute(OpenGaussComQueryExecutor.java:79)
           at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:108)
           at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
                                                     


-- 
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] peilinqian commented on issue #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally

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

   parameter configuration error;
      <entry key="ObjectStoreEnvironmentBean.defaultTimeout">300</entry>
   The correct value is:
      <entry key="CoordinatorEnvironmentBean.defaultTimeout">300</entry>
   
   
   Test Results :session 2 is first timeout
   order_db=> update t_order set order_name ='ds0_ _0' where user_id = 0 and order_id =0;
   ERROR:  Lock wait timeout: thread 139998864537344 on node dn_6001 waiting for ShareLock on transaction 57704 after 120000.131 ms
   DETAIL:  blocked by hold lock thread 139998904448768, statement <select * from t_order_0  UNION ALL select * from t_order_1 >, hold lockmode ExclusiveLock.
   


-- 
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] peilinqian closed issue #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally

Posted by GitBox <gi...@apache.org>.
peilinqian closed issue #19840: In the XA-Narayana transaction type scenario,The transaction timeout parameter does not take effect normally
URL: https://github.com/apache/shardingsphere/issues/19840


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