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

   shardingsphere-jdbc5.3.1 Cluster mode Execution exception
   zk watch Trigger the transaction container to be closed;
   
   2023-03-28 11:20:55.744  INFO 2996 --- [NotifyService-0] 
c.a.icatch.provider.imp.AssemblerImp     : USING core version: 5.0.9
   2023-03-28 11:20:55.744  INFO 2996 --- [NotifyService-0] 
c.a.icatch.provider.imp.AssemblerImp     : USING: 
com.atomikos.icatch.force_shutdown_on_Vm_exit = false
   ....
   com.atomikos.icatch.force_shutdown_on_vm_exit = false
   2023-03-28 11:20:55.744  INFO 2996 --- [NotifyService-0] 
c.a.icatch.provider.imp.AssemblerImp     : USING: 
com.atomikos.icatch.default_jta_timeout = 10000
   2023-03-28 11:20:55.745  INFO 2996 --- [NotifyService-0] 
c.a.icatch.provider.imp.AssemblerImp     : Using default (local) logging and 
recovery...
   2023-03-28 11:20:55.900  INFO 2996 --- [NotifyService-0] 
c.a.icatch.imp.TransactionServiceImp     : **Entering shutdown** (false, 0)...
   2023-03-28 11:20:55.900  INFO 2996 --- [NotifyService-0] 
c.a.icatch.imp.TransactionServiceImp     : Shutdown leaves no pending 
transactions - ok to delete logfiles
   
   excute sql:
   2023-03-28 11:55:04.640  INFO 13500 --- [nio-8003-exec-1] ShardingSphere-SQL 
                      : Logic SQL: SELECT  
id,name,carid,classroom,age,wdatatime,en_cardid,en_name,pwd  FROM student
   2023-03-28 11:55:04.640  INFO 13500 --- [nio-8003-exec-1] ShardingSphere-SQL 
                      : Actual SQL: ds_0 ::: SELECT  id,en_name AS 
name,en_cardid AS carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd 
 FROM student0 UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student1 
UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student2 
UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student3
   2023-03-28 11:55:04.640  INFO 13500 --- [nio-8003-exec-1] ShardingSphere-SQL 
                      : Actual SQL: ds_1 ::: SELECT  id,en_name AS 
name,en_cardid AS carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd 
 FROM student0 UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student1 
UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student2 
UNION ALL SELECT  id,en_name AS name,en_cardid AS 
carid,classroom,age,wdatatime,en_cardid,en_name,en_pwd AS pwd  FROM student3
   input2 =================================list:**111(Number of database data 
records queried)**
   2023-03-28 11:55:05.122  WARN 13500 --- [nio-8003-exec-1] 
c.a.icatch.jta.TransactionManagerImp     : This method needs a transaction for 
the calling thread and none exists.
   Possible causes: either you didn't start a transaction,
   it rolledback due to timeout, or it was committed already.
   ACTIONS: You can try one of the following: 
   1. Make sure you started a transaction for the thread.
   2. Make sure you didn't terminate it yet.
   3. Increase the transaction timeout to avoid automatic rollback of long 
transactions;
   
   springboot:
   @Service
   @Transactional(rollbackFor = Exception.class) 
   public class StudentBoImpl implements StudentBo {
       public List<Student> list()
       {   
           System.out.println("input1 =================================");
           QueryWrapper<Student> objectQueryWrapper = new QueryWrapper();
           List list1 = studentMapper.selectList(objectQueryWrapper);
           System.out.println("input2 
=================================list:"+list1.size());
           return list1;
       }
   }
   
   config:
   databaseName: testdb
   mode:
     type: Cluster
     repository:
       type: ZooKeeper
       props:
         namespace: cluster1
         server-lists: 127.0.0.1:2181 #,127.0.0.1:2182,127.0.0.1:2183
         retryIntervalMilliseconds: 5000000
         timeToLiveSeconds: 600
         maxRetries: 3
         operationTimeoutMilliseconds: 50000
   dataSources:
     ds_0:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: org.postgresql.Driver
       jdbcUrl: jdbc:postgresql://***:5588/ybdev
       username: ybdev_pg
       password: *******
       poolName: db01_pool
     ds_1:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: org.postgresql.Driver
       jdbcUrl: jdbc:postgresql://***:5588/ybdev1
       username: ybdev1_pg
       password: ***
       poolName: db02_pool
   
   rules:
     - !TRANSACTION
       defaultType: XA  
       providerType: Atomikos
     - !SQL_PARSER
       sqlCommentParseEnabled: true
     - !SHARDING
       tables:
         student:
           actualDataNodes: ds_$->{0..1}.student$->{0..3}
           databaseStrategy:                            
             standard:                                  
               shardingColumn: id                     
               shardingAlgorithmName: mod-mod-2        
           tableStrategy:
             standard:
               shardingColumn: name
               shardingAlgorithmName: hash-mod-4
           keyGenerateStrategy:
             column: id
             keyGeneratorName: snowflake
         studentback:
           actualDataNodes: ds_$->{0..1}.studentback$->{0..3}
           databaseStrategy:                        
             standard:                                
               shardingColumn: name               
               shardingAlgorithmName: hash-mod-2        
           tableStrategy:                                
             standard:                                    
               shardingColumn: id                 
               shardingAlgorithmName: mod-mod-4       
           keyGenerateStrategy:
             column: id
             keyGeneratorName: snowflake
   
       defaultDatabaseStrategy:
         standard:
           shardingColumn: id
           shardingAlgorithmName: mod-mod-2
   
       shardingAlgorithms:
         mod-mod-2:
           type: MOD
           props:
             sharding-count: 2
         mod-mod-4:
           type: MOD
           props:
             sharding-count: 4
         hash-mod-4:
           type: HASH_MOD
           props:
             sharding-count: 4
         hash-mod-2:
           type: HASH_MOD
           props:
             sharding-count: 2
       keyGenerators:
         snowflake:
           type: SNOWFLAKE
     - !ENCRYPT
       tables:
         student:
           columns: 
             name: 
               plainColumn: name
               cipherColumn: en_name 
               encryptorName: aes-encryptor
             carid: 
               plainColumn: carid 
               cipherColumn: en_cardid 
               encryptorName: aes-encryptor
             pwd: 
               cipherColumn: en_pwd 
               encryptorName: sm4-encryptor  
               queryWithCipherColumn: true 
           queryWithCipherColumn: true  
       encryptors:
         aes-encryptor:
           type: AES
           props:
             aes-key-value: 123456abc
         sm4-encryptor: 
           type: SM4
           props:
             sm4-key: 182A51756BC9D813AB07B4ED5A7E3C0A
             sm4-mode: ECB
             sm4-padding: PKCS7Padding
     - !MASK  
       tables:
         student:
           columns:
             pwd:
               maskAlgorithm: mask_before_special_chars_mask1
             name:
               maskAlgorithm: keep_first_n_last_m_mask
             classroom:
               maskAlgorithm: keep_first_n_last_m_mask
   
       maskAlgorithms:
         md5_mask:
           type: MD5
         mask_before_special_chars_mask1:
           type: MASK_BEFORE_SPECIAL_CHARS
           props:
             special-chars: '6'
             replace-char: '*'
         mask_before_special_chars_mask:
           type: MASK_BEFORE_SPECIAL_CHARS
           props:
             special-chars: 'A'
             replace-char: '*'
         keep_first_n_last_m_mask:
           type: KEEP_FIRST_N_LAST_M
           props:
             first-n: 3
             last-m: 4
             replace-char: '*'
   props:
     sql-show: true
   


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to