-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] : 온보딩 시 중복 가입 방어 로직을 추가한다 #305
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
Conversation
Walkthrough온보딩 중복 방지 기능을 추가하여 providerId로 기존 사용자를 검증하고, 중복 발견 시 409 Conflict 상태를 반환합니다. UserService, UserRepository, UserErrorStatus에 새로운 메서드와 에러 상태를 도입하고 관련 문서를 작성했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CLAUDE.md (1)
90-90: 마크다운 서식 개선 제안 (선택사항)Line 90의
@Transactional텍스트가 강조 구문으로 인식되고 있습니다. 의도한 서식이 맞다면 무시하셔도 됩니다.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.claude/docs/features/onboarding-duplicate-prevention.md(1 hunks)CLAUDE.md(1 hunks)src/main/java/side/onetime/exception/status/UserErrorStatus.java(1 hunks)src/main/java/side/onetime/repository/UserRepository.java(1 hunks)src/main/java/side/onetime/service/UserService.java(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md
90-90: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Push to ECR
🔇 Additional comments (3)
src/main/java/side/onetime/exception/status/UserErrorStatus.java (1)
18-18: LGTM! 적절한 에러 코드 추가입니다.중복 가입 시나리오에 대해 409 Conflict 상태 코드를 사용한 것은 RESTful 표준에 부합합니다. 에러 메시지도 명확하고 일관된 형식을 따르고 있습니다.
src/main/java/side/onetime/repository/UserRepository.java (1)
18-18: LGTM! Spring Data JPA 네이밍 컨벤션을 따르고 있습니다.
existsByProviderId메서드는 Spring Data JPA가 자동으로 구현해주며, 중복 체크를 위한 효율적인 EXISTS 쿼리를 생성합니다. 이미 존재하는findByProviderId메서드를 통해providerId필드가 유효함을 확인할 수 있습니다.src/main/java/side/onetime/service/UserService.java (1)
44-48: 중복 가입 방어 로직이 잘 구현되었습니다.애플리케이션 레벨에서 대부분의 중복 요청을 방어하고 명확한 에러 메시지(409 Conflict)를 반환하는 것은 좋은 접근입니다.
provider_id컬럼에 unique 제약이 실제로 존재하며(@Column(unique = true)), check-then-act 패턴의 race condition은 DB unique constraint가 최종 방어선 역할을 하므로 이 저빈도 작업에서는 허용 가능한 트레이드오프입니다.
anxi01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
✅ PR 유형
🚀 작업 내용
📝️ 관련 이슈
💬 기타 사항 or 추가 코멘트
Summary by CodeRabbit
릴리스 노트
새 기능
버그 수정
문서
✏️ Tip: You can customize this high-level summary in your review settings.