Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor/UR-92] 기존 좋아요/싫어요 기능에 대한 Redis 의존성 제거 #110

Open
4 tasks done
alexization opened this issue Feb 5, 2025 · 0 comments · May be fixed by #111
Open
4 tasks done

[refactor/UR-92] 기존 좋아요/싫어요 기능에 대한 Redis 의존성 제거 #110

alexization opened this issue Feb 5, 2025 · 0 comments · May be fixed by #111
Assignees

Comments

@alexization
Copy link
Member

alexization commented Feb 5, 2025

기존 문제점

현재 좋아요/싫어요 를 클릭했을 때 동시성 문제를 방지하기 위해 Redis 를 사용했습니다.

하지만, 굳이 해당 기능에서 동시성 문제만을 해결하기 위해 Redis 를 사용하는 것은 비효율적이라 판단하였고, JPA와 MySQL 만을 이용하여 해당 기능을 정상적으로 수행할 수 있도록 코드를 리팩토링 하려고 합니다.

목표

Redis 의존을 걷어내고 JPA와 MySQL 만을 활용하여 좋아요/싫어요 기능을 구현한 뒤, 테스트 코드를 통한 검증

  • Redis를 제거하고 JPA와 MySQL만으로 좋아요/싫어요 기능의 동시성 문제 해결
  • 비관적 락(Pessimistic Lock)을 활용한 데이터 정합성 보장 구현
  • 트랜잭션 격리 수준 설정을 통한 일관된 데이터 조회 보장
  • 데드락 방지를 위한 Lock Timeout 설정 추가
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant