Actually this bug can take place only with MVCC databases: with pessimistic locking, T1 removing data from DB locks the table and T2 is blocked when trying to read those data before T1 commits.