fix: 스케줄러 타임존 불일치 및 LazyInitializationException 수정#252
Merged
Conversation
- [H-6] LocalDateTime.now() → LocalDateTime.now(ZoneId.of("Asia/Seoul"))로 수정
(RequestSchedulerService, UserSchedulerService 모두 적용)
UTC 컨테이너 환경에서 KST cron과 최대 9시간 오차 발생하던 버그 해결
- [H-7] UserLifecycleTransactionalService 신규 도입
processInactiveUsers()에서 user.getRequests() 접근 시 트랜잭션 없어
LazyInitializationException 발생하던 문제를 유저별 독립 @transactional로 해결
동시에 H-11 위험(단일 트랜잭션 롤백 전파)도 예방
- 테스트 코드: LocalDateTime.now(ZoneId) 정적 목 추가
Closes #246, #247
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
관련 이슈
변경 사항
[H-6] LocalDateTime.now() 타임존 수정
UTC 컨테이너 환경에서 cron의 KST 시간대와 최대 9시간 오차가 발생하던 문제를 수정합니다.
RequestSchedulerService,UserSchedulerService양쪽 모두 적용합니다.[H-7] UserLifecycleTransactionalService 도입
processInactiveUsers()에서user.getRequests()를 트랜잭션 없이 접근하여LazyInitializationException이 발생하던 문제를 해결합니다.UserLifecycleTransactionalService신규 생성: 유저별 독립@Transactional메서드 제공UserSchedulerService는 조회만 하고, 실제 처리는UserLifecycleTransactionalService에 위임테스트
./gradlew test)RequestSchedulerServiceTest:LocalDateTime.now(ZoneId)정적 목 추가🤖 Generated with Claude Code