I called a mybatis activity from a Springboot ThreadPool, and my datasource type is HikariDataSource. There are two activities in a function, one is delete and another is save.
The problem is that the save activity was stucking there, I traced the log and find that while the delete action finished, the save action did not start a connection:
2024-08-13T15:29:05.161+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] org.mybatis.spring.SqlSessionUtils : Creating a new SqlSession
2024-08-13T15:29:05.161+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] org.mybatis.spring.SqlSessionUtils : SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@19ca43ea] was not registered for synchronization because synchronization is not active
2024-08-13T15:29:05.163+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] o.m.s.t.SpringManagedTransaction : JDBC Connection [HikariProxyConnection@1244538017 wrapping org.postgresql.jdbc.PgConnection@22f54a18] will not be managed by Spring
2024-08-13T15:29:05.163+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] c.g.t.e.mapper.ExamScoreMapper.delete : ==> Preparing: DELETE FROM public.exam_score WHERE (student_code = ? AND content_code = ?)
2024-08-13T15:29:05.164+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] c.g.t.e.mapper.ExamScoreMapper.delete : ==> Parameters: 1(Long), XXSC(String)
2024-08-13T15:29:05.170+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] c.g.t.e.mapper.ExamScoreMapper.delete : <== Updates: 1
2024-08-13T15:29:05.171+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] org.mybatis.spring.SqlSessionUtils : Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@19ca43ea]
2024-08-13T15:29:05.183+08:00 DEBUG 18212 --- [topo-boot] [pool-4-thread-1] c.g.t.c.m.c.MybatisPlusMetaObjectHandler : mybatis plus start insert fill ....
2024-08-13T15:29:34.835+08:00 DEBUG 18212 --- [topo-boot] [min housekeeper] com.zaxxer.hikari.pool.HikariPool : Hikari-admin - Before cleanup stats (total=10, active=0, idle=10, waiting=0)
2024-08-13T15:29:34.835+08:00 DEBUG 18212 --- [topo-boot] [min housekeeper] com.zaxxer.hikari.pool.HikariPool : Hikari-admin - After cleanup stats (total=10, active=0, idle=10, waiting=0)
2024-08-13T15:29:34.835+08:00 DEBUG 18212 --- [topo-boot] [min housekeeper] com.zaxxer.hikari.pool.HikariPool : Hikari-admin - Fill pool skipped, pool is at sufficient level.