What happens when I have a Read Committed isolation level set and a phantom read is made in my transaction. Does it get rolled-back and re-run or just rolled-back?
3 Answers
1
votes
2
votes
Unless my understanding of Committed Read isolation is wonky (always a possibility), then the whole point of Committed Read is that you cannot see Phantom Rows - rows that were changed by another transaction but the change was never committed and later rolled back. So, at the application level, with Committed Read isolation, the application cannot see phantoms.
What the DBMS does internally depends on the DBMS. In a MVCC system, your transaction will simply read the version committed at the time your transaction started. In a locking system, you might hit the other transaction's lock, and then your own might skip or block. However, AFAIK, the DBMS does not roll back your transaction because of the problem.