java事务回滚 项目是dubbo+zookeeper的

2018-08-21 18:00:07,107 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - ==> Parameters: 2018-08-21(String), c5d6dc274bef447988cd467457009d87(String)
2018-08-21 18:00:07,109 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - <==      Total: 1
2018-08-21 18:00:07,109 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,109 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5] from current transaction
2018-08-21 18:00:07,109 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - ==>  Preparing: insert into tb_vip_receive_flow ( id, father_id, vip_id, vip_mobile, create_time, access_code ) values ( ?, ?, ?, ?, ?, ? ) 
2018-08-21 18:00:07,109 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - ==> Parameters: 51dc8fa03c9a4d2380b01ee9123b2800(String), c5d6dc274bef447988cd467457009d87(String), 2055(String), 13336601616(String), 2018-08-21 18:00:07.109(Timestamp), 2116(String)
2018-08-21 18:00:07,111 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - <==    Updates: 1
2018-08-21 18:00:07,111 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,111 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5] from current transaction
2018-08-21 18:00:07,111 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - ==>  Preparing: update tb_vip_receive_item SET able_receive_num = ?, received_num = ? where id = ? 
2018-08-21 18:00:07,111 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - ==> Parameters: 4(Integer), 4(Integer), c5d6dc274bef447988cd467457009d87(String)
2018-08-21 18:00:07,114 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - <==    Updates: 1
2018-08-21 18:00:07,114 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,114 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5] from current transaction
2018-08-21 18:00:07,114 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - ==>  Preparing: select vip_id, wechat_id, mobile, vip_card, password, recharge_balance, present_balance, all_balance, credit, status, is_join_event, create_time, create_operator, update_time, update_operator, profile_photo, category_code, category_name, category_desc, username, head_img_url from tb_vip where vip_id = ? 
2018-08-21 18:00:07,114 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - ==> Parameters: 2055(Long)
2018-08-21 18:00:07,115 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - <==      Total: 1
2018-08-21 18:00:07,115 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,115 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5] from current transaction
2018-08-21 18:00:07,115 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipHisMapper.insertSelective] - ==>  Preparing: insert into tb_vip_his ( vip_his_id, vip_id, create_time, create_operator, category_code, category_name, category_desc ) values ( ?, ?, ?, ?, ?, ?, ? ) 
2018-08-21 18:00:07,115 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipHisMapper.insertSelective] - ==> Parameters: 7510b3b3886d4d93a875caa097520798(String), 2055(Long), 2018-08-21 18:00:07.115(Timestamp), 2055(String), 105(Integer), info222(String), 
info
2018-08-21 18:00:07,118 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipHisMapper.insertSelective] - <==    Updates: 1
2018-08-21 18:00:07,118 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,118 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5] from current transaction
2018-08-21 18:00:07,118 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.updateByPrimaryKeySelective] - ==>  Preparing: update tb_vip SET profile_photo = ?, category_code = ?, category_name = ?, category_desc = ? where vip_id = ? 
2018-08-21 18:00:07,118 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.updateByPrimaryKeySelective] - ==> Parameters: https://d-gline.oss-cn-shanghai.aliyuncs.com/dgline/1532587798140.png(String), 105(Integer), info222(String), 
info, 2055(Long)
2018-08-21 18:00:07,120 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [com.mal.mapper.TbVipMapper.updateByPrimaryKeySelective] - <==    Updates: 1
2018-08-21 18:00:07,120 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43830cb5]
2018-08-21 18:00:07,120 [DubboServerHandler-ip.ip.ip.ip:20880-thread-195] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Participating in existing transaction
2018-08-21 18:00:07,174 [DubboServerHandler-ip.ip.ip.ip:20880-thread-196] DEBUG [com.alibaba.dubbo.remoting.transport.DecodeHandler] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation, dubbo version: 2.5.3, current host: ip.ip.ip.ip
2018-08-21 18:00:07,174 [DubboServerHandler-ip.ip.ip.ip:20880-thread-196] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Creating new transaction with name [com.mal.service.impl.VipCardReceiveServiceImpl.receiveVipCard]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; '',-java.lang.Exception
2018-08-21 18:00:07,175 [DubboServerHandler-ip.ip.ip.ip:20880-thread-196] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Acquired Connection [com.mysql.jdbc.JDBC4Connection@610456a0] for JDBC transaction
2018-08-21 18:00:07,175 [DubboServerHandler-ip.ip.ip.ip:20880-thread-196] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Switching JDBC Connection [com.mysql.jdbc.JDBC4Connection@610456a0] to manual commit
2018-08-21 18:00:07,176 [DubboServerHandler-ip.ip.ip.ip:20880-thread-196] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Participating in existing transaction
没有获取到分布式锁
2018-08-21 18:00:07,190 [DubboClientHandler-ip.ip.ip.ip:20883-thread-6] DEBUG [com.alibaba.dubbo.remoting.transport.DecodeHandler] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult, dubbo version: 2.5.3, current host: ip.ip.ip.ip
2018-08-21 18:00:07,206 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,207 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.selectByPrimaryKey] - ==>  Preparing: select id, father_id, receive_title_id, code, name, img, plan_date, start_time, end_time, all_receive_num, able_receive_num, received_num, card_desc, status, record_id from tb_vip_receive_item where id = ? 
2018-08-21 18:00:07,207 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.selectByPrimaryKey] - ==> Parameters: 592ccf6a051a450c9f543fa9bb624ac4(String)
2018-08-21 18:00:07,208 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.selectByPrimaryKey] - <==      Total: 1
2018-08-21 18:00:07,208 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,208 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,208 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveMapper.selectByPrimaryKey] - ==>  Preparing: select id, receive_title_id, father_id, code, name, img, all_receive_num, today_able_receive_num, start_date, end_date, start_time, end_time, card_desc, status from tb_vip_receive where id = ? 
2018-08-21 18:00:07,208 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveMapper.selectByPrimaryKey] - ==> Parameters: bb2d76b53b894b2d9d75e6dd17cd6018(String)
2018-08-21 18:00:07,209 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveMapper.selectByPrimaryKey] - <==      Total: 1
2018-08-21 18:00:07,209 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,209 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,209 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - ==>  Preparing: select COUNT(t.id) from tb_vip_receive_flow t where STR_TO_DATE(t.create_time,'%Y-%m-%d') =? 
2018-08-21 18:00:07,210 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - ==> Parameters: 2018-08-21(String)
2018-08-21 18:00:07,211 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - <==      Total: 1
2018-08-21 18:00:07,211 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,211 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,211 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - ==>  Preparing: select COUNT(t.id) from tb_vip_receive_flow t where STR_TO_DATE(t.create_time,'%Y-%m-%d') =? and t.father_id = ? 
2018-08-21 18:00:07,211 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - ==> Parameters: 2018-08-21(String), 592ccf6a051a450c9f543fa9bb624ac4(String)
2018-08-21 18:00:07,213 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.selectTodayReceiveCardCount] - <==      Total: 1
2018-08-21 18:00:07,213 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,213 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,213 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - ==>  Preparing: insert into tb_vip_receive_flow ( id, father_id, vip_id, vip_mobile, create_time, access_code ) values ( ?, ?, ?, ?, ?, ? ) 
2018-08-21 18:00:07,213 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - ==> Parameters: a1ce0df2200844dc906c644009cb95a6(String), 592ccf6a051a450c9f543fa9bb624ac4(String), 1970(String), 13819870786(String), 2018-08-21 18:00:07.213(Timestamp), 2117(String)
2018-08-21 18:00:07,215 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveFlowMapper.insertSelective] - <==    Updates: 1
2018-08-21 18:00:07,215 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,215 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,215 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - ==>  Preparing: update tb_vip_receive_item SET able_receive_num = ?, received_num = ? where id = ? 
2018-08-21 18:00:07,216 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - ==> Parameters: 2(Integer), 6(Integer), 592ccf6a051a450c9f543fa9bb624ac4(String)
2018-08-21 18:00:07,218 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipReceiveItemMapper.updateByPrimaryKeySelective] - <==    Updates: 1
2018-08-21 18:00:07,218 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,218 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342] from current transaction
2018-08-21 18:00:07,218 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - ==>  Preparing: select vip_id, wechat_id, mobile, vip_card, password, recharge_balance, present_balance, all_balance, credit, status, is_join_event, create_time, create_operator, update_time, update_operator, profile_photo, category_code, category_name, category_desc, username, head_img_url from tb_vip where vip_id = ? 
2018-08-21 18:00:07,218 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - ==> Parameters: 1970(Long)
2018-08-21 18:00:07,219 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.mal.mapper.TbVipMapper.selectByPrimaryKey] - <==      Total: 1
2018-08-21 18:00:07,219 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Participating transaction failed - marking existing transaction as rollback-only
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Setting JDBC transaction [com.mysql.jdbc.JDBC4Connection@4a658e08] rollback-only
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.mybatis.spring.SqlSessionUtils] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@766c8342]
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Initiating transaction rollback
2018-08-21 18:00:07,220 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Rolling back JDBC transaction on Connection [com.mysql.jdbc.JDBC4Connection@4a658e08]
2018-08-21 18:00:07,224 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Releasing JDBC Connection [com.mysql.jdbc.JDBC4Connection@4a658e08] after transaction
2018-08-21 18:00:07,224 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource
2018-08-21 18:00:07,389 [DubboServerHandler-ip.ip.ip.ip:20880-thread-191] DEBUG [com.alibaba.dubbo.remoting.transport.DecodeHandler] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation, dubbo version: 2.5.3, current host: ip.ip.ip.ip

上面是我从服务器上拿下来的日志,比较多..我现在的问题是前面的一些sql语句都没有插入到数据库里,比如:

clipboard.png
然后我有看到了最后几行有 Rolling back JDBC transaction on Connection [com.mysql.jdbc.JDBC4Connection@4a658e08]貌似事务回滚了,但是中间的一些语句都执行到数据库里了,最上面的语句反而没有执行。不知道这个回滚是不是对于我最上面的sql执行而言的,该怎么判断呢?

clipboard.png

阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏