Repository navigation
fix: JVM 시간대 ≠ JDBC 연결 시간대면 기동 거부 + 테스트 JVM 을 Asia/Seoul 로 (#846) - #847
Merged
Merged
Conversation
세션 시작 시각은 Hibernate 가 JVM→serverTimezone 으로 변환해 쓰고, pose_data.created_at 은 JdbcTemplate setObject(LocalDateTime) 로 변환 없이 쓴다. 두 시간대가 다르면 9시간 어긋나 완료 집계(findRepSummaries 의 created_at = 시작 시각)가 rep 을 못 찾고 통계·세트·리포트가 오류 없이 빈다. CI(JVM UTC)에서 RejectedAttemptRaceTest 가 처음부터 이 이유로만 실패했다(로컬 KST 는 통과). - build.gradle: 테스트 JVM -Duser.timezone=Asia/Seoul (운영 컨테이너 TZ 와 같게) - JvmTimezoneStartupCheck: URL 의 connectionTimeZone/serverTimezone 과 JVM 시간대 규칙이 다르면 기동 거부. 운영은 TZ=Asia/Seoul 로 이미 맞아 있어 동작 변화 없음 — 숨은 전제를 강제하는 것 검증: UTC 호스트에서 RejectedAttemptRaceTest 5/5(전엔 같은 조건에서 70.67≠42.0 재현) · 판정 단위 5/5 · H2 컨텍스트 · 실 MySQL 컨텍스트 통과. 로컬 compose: TZ=Asia/Seoul 이면 «JVM 시간대 확인» 후 UP, TZ=UTC 로 띄우면 BeanCreationException 으로 기동 중단. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@coderabbitai review |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
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. |
Action not completed
|
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.
Closes #846
원인
같은 «세션 시작 시각» 을 두 경로가 다르게 쓴다.
exercise_sessions.start_time: Hibernate 가 JVM 시간대 → URLserverTimezone=Asia/Seoul로 변환해서 쓴다pose_data.created_at:PoseDataService의 JdbcTemplatesetObject(LocalDateTime)가 변환 없이 쓴다JVM 이 KST 가 아니면 두 값이 9시간 어긋난다. 그러면 완료 집계(
findRepSummaries,created_at = 시작 시각)가 rep 을 못 찾아 싱크 통계·세트·리포트가 오류 없이 빈다. CI 러너(JVM UTC)에서RejectedAttemptRaceTest가 이 이유로만 실패했다. 재현과 값은 #846 댓글에 있다.운영·dev 는 컨테이너
TZ=Asia/Seoul로 이미 맞아 있어 지금 영향은 없다. 다만 그 전제가 어디에도 강제돼 있지 않았다.변경
build.gradle: 테스트 JVM-Duser.timezone=Asia/Seoul(운영과 같게)JvmTimezoneStartupCheck(새 빈): URL 의connectionTimeZone/serverTimezone과 JVM 시간대 규칙이 다르면 기동 거부. URL 에 시간대가 없거나LOCAL이면 통과(드라이버가 변환하지 않는다). MySQL 이 아니면 건너뜀저장 코드를 시간대와 무관하게 바꾸는 근본 수정은 범위 밖이다. 같은 패턴이
RejectedAttemptService·FeedbackLogService·PoseDataOrphanMonitor에도 있어, 분기 문서가 필요한 크기다.검증
JAVA_TOOL_OPTIONS=-Duser.timezone=UTC, CI 조건)에서RejectedAttemptRaceTest5/5. 수정 전 같은 조건에서70.67 ≠ 42.0재현ShadowfitApplicationTests(H2) ·BinlogFormatStartupCheckRaceTest(실 MySQL 컨텍스트) 통과TZ=Asia/Seoul→JVM 시간대 확인 — Asia/Seoul후 UP.TZ=UTC로 띄우면BeanCreationException으로 기동 중단🤖 Generated with Claude Code