Available categories: [/] [working on downwap.] [trouble shooting] [working on Yup Mailman]
Another way to deadlock | 另类死锁 [Permalink] Sat Oct 08 17:41:45 CST 2005 前段时间系统频繁出现死锁。按照目前站点压力来看绝对不正常,但是一直也没有找到原因所在。今天翻代码的时候,无意中发现DBHandler类在open()方法中,从pool获取conn之后执行了conn.setAutoCommit(false);而之后没有任何地方有显式的conn.commit();。因为close时候实际只是把conn送回pool,所以这样一来,唯一的机会就在下次这个conn再被取出并执行conn.setAutoCommit(false);的时候隐式commit了(*根据规范,setAutoCommit()会提交当前所有trans)。
Posted by: miles |
? |
Available categories: [/] [working on downwap.] [trouble shooting] [working on Yup Mailman]
html hits:?23578