Replies: 3 comments
-
|
낙관적 락과 비관적 락은 동시성 충돌을 어떻게 가정하느냐에 따른 락 전략의 차이입니다. 낙관적 락은 충돌이 자주 발생하지 않는다고 가정하고, 락을 미리 잡지 않고 처리한뒤, 커밋 시점에 버전 값이나 조건을 통해 충돌을 검증하는 방식입니다. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
낙관적 락은 충돌이 자주 발생하지 않는다고 가정하고, 락 없이 데이터를 처리하는 방법입니다. 이후, 커밋 시점에 버전 또는 타임스탬프를 비교해 충돌 발생 시 롤백을 시키게 됩니다. 비관적 락은 충돌이 자주 발생한다고 가정하고, 데이터를 읽거나 수정할 때 즉시 락(S-lock / X-lock)을 획득하는 방법입니다. 이는 다른 트랜잭션의 접근을 차단하게 됩니다. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
개념과 함께 차이점을 설명해주세요.
Beta Was this translation helpful? Give feedback.
All reactions