近一年一些小坑

1.事务中包含rpc请求

send amq,db commit

db操作成功之前,amq已收到消息,db not find,a sad story

2.int Integer

method param int,传递参数Integer,npe

beanCopy一int,一integer npe

3.mysql lock

for update悲观锁

set autocommit=0;

update xxx where id=1

--------

set autocommit=0; 锁等待,死锁

update xxx where id=1

4.mysql insertorupdate
no data,insert,return 1
has same data,return 1
hsa diff data,return 2
5.spring transaction
spring 事务传递,try catch并不会起作用

6.客户端发送一次请求,服务端收到多次
http connection: Keep-Alive,调整为close,http长连接,网络不稳定tcp重传机制

猜你喜欢

转载自blog.csdn.net/u012914981/article/details/53436341