[FIX] N+1 쿼리 문제 해결 및 미사용 코드 정리 #71
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📋 개요
JPA N+1 쿼리 문제를 Fetch Join을 통해 해결하고, 버전 변경으로 인한 중복/미사용 코드를 정리했습니다.
🎯 해결한 문제
1. N+1 쿼리 문제
2. 중복 코드 문제
🔧 주요 변경사항
N+1 쿼리 해결
AuthRepository 개선
SuspendRepository 개선
서비스 레이어 수정
LoginServiceImpl: LoginStatus를 함께 조회WithdrawalManagementServiceImpl: Withdraw를 함께 조회SuspendRelease: Auth와 suspensions를 한 번에 조회미사용 코드 제거
SignupClientInterface.java(미사용)SignupClientService.java(SignupServiceImpl과 중복)UpdateService.EmailConfirm()메서드 (백업용 미사용 코드)📊 성능 개선 결과
예상 효과
🧪 테스트
테스트 결과
./gradlew clean test BUILD SUCCESSFUL 305 tests completed, 0 failed ✅테스트 수정사항
LoginServiceImplTest: 새로운 Repository 메서드 호출 검증WithdrawalManagementServiceImplTest: 새로운 Repository 메서드 호출 검증UpdateServiceTest: EmailConfirm 관련 테스트 제거📝 체크리스트
N1_QUERY_IMPROVEMENT.md)🔍 리뷰 포인트
Fetch Join 전략의 적절성
테스트 커버리지
성능 최적화 효과
📚 관련 문서
🏷️ 라벨
bug,performance,refactoring,cleanup👥 리뷰어
@팀원1 @팀원2
Note: 이 PR은 성능 최적화와 코드 정리를 동시에 진행했습니다.
변경 범위가 크지만, 각 변경사항은 독립적이며 안전하게 테스트되었습니다.