HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
하나의 락을 거는 트랜잭션(RedisService)과 비즈니스 로직의 트랜잭션(StockService)을 같은 트랜잭션으로 사용할 경우 commit이 되기전에 unlock을 수행할 수 있고, unlock 과 commit 사이의 시점에 또 다른 요청이 들어올 때 커밋이 되기 전이므로 동시성 문제가 발생할 수 있게 된다