You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 하나의 트랜잭션에서 일정 범위의 같은 쿼리를 두 번 실행했을 경우,
첫 번째 쿼리에서 없던 유령 레코드가 두 번째 쿼리에서 나타나는 상황,
첫 번째 쿼리에서 있던 레코드가 두 번째 쿼리에서 사라지는 상황
- 예시
1. T1이 특정 조건으로 데이터들을 검색하여 결과를 얻는다
2. T2가 접근하여 해당 조건의 데이터 일부를 삭제하거나 추가한다
3. T1이 다시 해당 조건으로 데이터들을 조회하면 결과가 변경된다
- 해결 방안
- Serializable 격리 수준이 가장 좋지만, 성능 저하 문제로 사용하지 않음
- MySQL의 InnoDB는 멀티 버전 동시성 제어를 통해 어느정도 극복(next key lock)
이러한 방식으로 조사를 해 봤는데, 그렇다면 Repeatable Read 상태로 현재 트랜잭션 이전의 commit 상태에서만 확인 가능해진다면, Phantom Read도 해결이 되는 게 아닌가요?? 조사를 하다 보니 내용이 충돌해서 질문합니다~
The text was updated successfully, but these errors were encountered:
Phantom Read
이러한 방식으로 조사를 해 봤는데, 그렇다면 Repeatable Read 상태로 현재 트랜잭션 이전의 commit 상태에서만 확인 가능해진다면, Phantom Read도 해결이 되는 게 아닌가요?? 조사를 하다 보니 내용이 충돌해서 질문합니다~
The text was updated successfully, but these errors were encountered: