fix thread db txn access conflict