Skip to content

[REFACTOR] UTC 기준 시간 통일 - #190

Merged
rkdehdrbs7885-oss merged 13 commits into
developfrom
refactor/#83-utc-timezone
Aug 11, 2026
Merged

[REFACTOR] UTC 기준 시간 통일#190
rkdehdrbs7885-oss merged 13 commits into
developfrom
refactor/#83-utc-timezone

Conversation

@rkdehdrbs7885-oss

@rkdehdrbs7885-oss rkdehdrbs7885-oss commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

📍 개요

UTC 기준 시간 통일

⛓️‍💥 관련 이슈


🛠️ 작업 내용

  • 시스템 전체 도메인(User, Playing, BackingTrack, Analysis, History, Learning, Statistics, Auth)의 날짜/시간 필드를 LocalDateTime에서 표준 절대 시간 객체인 Instant (UTC)로 전면 교체했습니다.
  • 전역 유틸리티(RelativeDateFormatter) 및 S3 파일 키 생성기(S3ObjectKeyGenerator)에 한국 타임존(Asia/Seoul)을 적용하여 뷰 및 파일명 생성 시 정확한 로컬 날짜/시간이 반영되도록 수정했습니다.

🔥 리뷰 요청 사항

리뷰어가 중점적으로 확인해주었으면 하는 내용을 작성해주세요.

  • 예외 코드 처리 방식

✅ 체크리스트

  • 코드 컨벤션을 준수했습니다.
  • 불필요한 코드 및 import를 제거했습니다.
  • 예외 처리를 적용했습니다.
  • 테스트를 완료했습니다.
  • 관련 Issue를 연결했습니다.

📎 참고 사항

Summary by CodeRabbit

  • 개선 사항

    • 애플리케이션 전반의 날짜·시간이 UTC 기준으로 통일되어 더욱 일관된 타임스탬프를 제공합니다.
    • 주간·월간 통계, 출석, 추천 콘텐츠 등의 기준이 한국 시간대에 맞게 계산됩니다.
    • 분석·재생·학습·알림·프로필 등 API 응답의 시간 형식이 ISO-8601 UTC로 제공됩니다.
    • 상대 날짜 표시가 한국 표준시를 기준으로 동작합니다.
  • 설정

    • OAuth 리디렉션 및 외부 서비스 설정이 업데이트되었습니다.
    • 데이터베이스 시간대 저장을 지원하도록 마이그레이션이 추가되었습니다.

@rkdehdrbs7885-oss rkdehdrbs7885-oss linked an issue Aug 10, 2026 that may be closed by this pull request
6 tasks
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

애플리케이션의 날짜·시간 타입을 LocalDateTime에서 Instant로 변경했습니다. 서버 기본 시간대를 UTC로 설정하고, 날짜 기반 기능은 Asia/Seoul 기준으로 계산합니다. 분석 시간 컬럼은 timestamptz로 변경하며, API와 테스트도 갱신했습니다.

Changes

UTC 시간 마이그레이션

Layer / File(s) Summary
공통 시간 계약과 핵심 도메인
src/main/java/com/mr/Application.java, src/main/java/com/mr/global/entity/*, src/main/java/com/mr/domain/{analysis,auth,learning,mentor,statistics,subscriptions,weakness}/...
공통 엔티티와 핵심 도메인의 시간 필드, 생성 메서드, 만료 검증 및 상태 변경 메서드를 Instant 기반으로 변경했습니다. 애플리케이션 기본 시간대는 UTC로 설정합니다.
도메인 처리와 조회 기준
src/main/java/com/mr/domain/{analysis,backingtrack,history,home,notification,playing,statistics}/..., src/main/java/com/mr/global/file/s3/service/S3ObjectKeyGenerator.java
cutoff와 주간·월간 기준 시각을 Instant로 변경했습니다. 날짜 계산은 필요한 경우 Asia/Seoul 기준으로 수행합니다. 저장소 조회와 S3 키 포맷도 새 시간 계약을 사용합니다.
API 응답과 데이터베이스 계약
src/main/java/com/mr/domain/*/dto/res/*, src/main/resources/db/migration/V8__alter_analysis_time_columns_to_timestamptz.sql
응답 DTO의 시간 필드와 UTC 예시를 갱신했습니다. 분석 테이블의 processing_started_at, created_at 컬럼을 TIMESTAMP WITH TIME ZONE으로 변경하고 기존 값을 변환합니다.
검증 및 실행 설정 갱신
src/test/java/com/mr/domain/*, src/main/resources/application.yml, src/main/java/com/mr/global/util/RelativeDateFormatter.java, src/main/java/com/mr/global/security/jwt/JwtTokenProvider.java
테스트 픽스처와 검증 값을 Instant로 갱신했습니다. 상대 날짜 표시와 JWT 만료 시각은 UTC 및 Asia/Seoul 기준을 사용합니다. 애플리케이션 설정의 데이터베이스, OAuth, AI, S3 기본값도 변경했습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • Musereview/BE#84: 분석 시간 처리와 Application, 분석 엔티티, DTO, 저장소를 함께 변경합니다.
  • Musereview/BE#52: 분석·재생 저장소와 기록 조회의 시간 기반 API를 직접 연결합니다.
  • Musereview/BE#63: RelativeDateFormatter, HistoryService, HomeService의 날짜 처리와 직접 연결됩니다.

Poem

LocalDateTime은 잠들고, Instant가 흐르네
UTC 시계는 고르게 빛나네
서울의 월요일은 자정을 찾고
timestamptz가 시간을 품네
테스트도 새 박자에 맞춰 춤추네 ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Instant 전환과 timestamptz 마이그레이션은 구현했지만, 기존 데이터 보정이 analysis 일부 컬럼에만 적용되어 이슈 #83 요구사항을 충족하지 못합니다. 모든 관련 날짜·시간 컬럼에 대한 기존 데이터 보정 마이그레이션을 추가하고, 서버 및 DB UTC 설정을 명시적으로 검증하세요.
Out of Scope Changes check ⚠️ Warning application.yml의 DB 포트, ddl-auto, CORS, OAuth, S3 및 AI 설정 변경은 이슈 #83의 UTC 통일 범위를 벗어납니다. UTC 통일과 직접 관련된 설정만 유지하고, DB 포트·ddl-auto·CORS·OAuth·S3·AI 설정 변경은 별도 PR로 분리하세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.73% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 PR의 핵심 변경인 UTC 기준 시간 통일을 명확하게 요약합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/#83-utc-timezone

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java (1)

25-38: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

분석 응답의 Instant JSON 형식을 테스트로 고정하세요.

현재 AnalysisControllerTest는 DTO를 만들고 mockMvc로 요청하지만 playedAt, createdAt, completedAt, report.createdAt, report.updatedAt의 JSON value를 검증하지 않습니다. Jackson 기본 설정에서는 Instant가 숫자 epoch로 직렬화될 수 있으므로, ISO-8601 문자열이 의도한 계약이라면 테스트에서 jsonPath(...).value("...Z") 또는 JsonFormat 같은 계약 고정 방식을 적용하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java`
around lines 25 - 38, 고정된 ISO-8601 문자열 형식이 모든 분석 응답의 Instant 필드에 적용되는지 검증하세요.
AnalysisResultResponseDTO.java의 25-38행과 109-110행,
AnalysisCreateResponseDTO.java의 8-18행, AnalysisStatusResponseDTO.java의 8-28행에
해당하는 playedAt, createdAt, completedAt 및 report.createdAt/updatedAt 필드를
AnalysisControllerTest의 jsonPath 검증으로 실제 “...Z” 값을 확인하고, 필요하면 JsonFormat 등으로 직렬화
계약을 명시하세요.
src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java (1)

44-48: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

PROCESSING_STARTED_ATFIXED_CLOCK의 시각을 동일하게 맞추세요.

FIXED_CLOCK2026-07-31T03:00:00Z를 반환하지만 PROCESSING_STARTED_AT2026-07-31T12:00:00Z입니다. 제공된 AnalysisStateService.javanow()(Line 202-204)는 Instant.now(clock)를 반환하므로 상태 전환에서 기록하는 시각과 검증 시각이 달라집니다. 관련 테스트가 실패합니다.

기존 값이 2026-07-31 12:00Asia/Seoul 시각을 의미했다면 UTC 값은 2026-07-31T03:00:00Z입니다. 그렇지 않으면 FIXED_CLOCK12:00Z로 변경하세요.

수정 예시
-    private static final Instant PROCESSING_STARTED_AT = Instant.parse("2026-07-31T12:00:00Z");
+    private static final Instant PROCESSING_STARTED_AT = Instant.parse("2026-07-31T03:00:00Z");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java`
around lines 44 - 48, AnalysisStateServiceTest의 PROCESSING_STARTED_AT과
FIXED_CLOCK이 동일한 순간을 가리키도록 수정하세요. 기존 Asia/Seoul 기준 2026-07-31 12:00 의도를 유지하려면
PROCESSING_STARTED_AT을 2026-07-31T03:00:00Z로 맞추고, 그렇지 않으면 FIXED_CLOCK을 12:00Z로
변경하세요.
🧹 Nitpick comments (2)
src/test/java/com/mr/domain/auth/service/AuthTransactionServiceTest.java (1)

91-91: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

갱신 토큰 만료 시각을 정확히 검증하세요.

Line 107의 any(Instant.class)는 잘못된 만료 시각이나 누락된 전달을 검출하지 못합니다. Line 91에서 고정된 Instant를 변수로 저장하세요. 그런 다음 updateRefreshToken에서 같은 값을 eq로 검증하세요. 토큰 만료 시각은 인증 보안 계약입니다.

권장 테스트 수정
-        given(tokenProvider.getRefreshTokenExpiryTime()).willReturn(Instant.now().plus(7, ChronoUnit.DAYS));
+        Instant refreshTokenExpiry = Instant.parse("2026-12-31T00:00:00Z");
+        given(tokenProvider.getRefreshTokenExpiryTime()).willReturn(refreshTokenExpiry);
...
-                any(Instant.class),
+                org.mockito.ArgumentMatchers.eq(refreshTokenExpiry),

Also applies to: 107-107

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/java/com/mr/domain/auth/service/AuthTransactionServiceTest.java` at
line 91, AuthTransactionServiceTest에서 tokenProvider.getRefreshTokenExpiryTime()에
전달하는 Instant를 고정된 변수로 저장하고, updateRefreshToken 검증의 any(Instant.class)를 해당 변수에 대한
eq 검증으로 변경하세요. 이를 통해 갱신 토큰 만료 시각이 정확히 전달되는지 검증하고 기존 토큰 관련 검증은 유지하세요.
src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java (1)

103-105: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

고정 시간 테스트에서 Instant.now()를 사용하지 마세요.

이 테스트는 FIXED_CLOCK를 선언했지만 cutoff를 시스템 시계에서 생성합니다. 처리 시작 시각과 cutoff의 관계는 유지되지만 테스트 데이터가 실행 시각에 따라 달라집니다. FIXED_CLOCK.instant()를 사용해 테스트를 재현 가능하게 만드세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java`
around lines 103 - 105, Update the cutoff initialization in
AnalysisStateServiceTest to use FIXED_CLOCK.instant() instead of Instant.now().
Keep the existing processing-start timestamp relationship by deriving it from
the fixed cutoff.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/mr/domain/analysis/scheduler/AnalysisRecoveryScheduler.java`:
- Around line 54-62: Update AnalysisRecoverySchedulerTest to expect the
processing cutoff as 2026-07-31T02:58:00Z when the fixed clock is
2026-07-31T03:00:00Z and processingThreshold is two minutes; keep the scheduler
implementation unchanged.

In
`@src/main/java/com/mr/domain/backingtrack/dto/res/BackingTrackCreateResponseDTO.java`:
- Around line 13-16: Update the JsonFormat patterns for both createdAt and
updatedAt in BackingTrackCreateResponseDTO.java (lines 13-16) and
BackingTrackUpdateResponseDTO.java (lines 13-20) to append XXX, preserving UTC
serialization while including the timezone offset in the API response.

In `@src/main/java/com/mr/domain/home/dto/res/HomeResponseDTO.java`:
- Line 184: Update the OpenAPI description and example for the playedAt field in
HomeResponseDTO to represent its Instant value in UTC, including an explicit UTC
offset such as “Z”. Keep the documented timestamp format consistent with the
API’s UTC response contract.

In `@src/main/java/com/mr/domain/learning/dto/res/LearningResultResponseDTO.java`:
- Around line 26-27: Update the completedAt `@Schema` metadata in
LearningResultResponseDTO to use the UTC instant example 2026-07-07T15:30:00Z,
and set format to date-time if needed to keep the generated SpringDoc/OpenAPI
schema consistent.

In
`@src/main/java/com/mr/domain/statistics/service/StatisticsAggregationService.java`:
- Around line 95-97: StatisticsAggregationService must derive the weekly KST
date from the injected clock’s Instant rather than LocalDate.now(clock). Update
the weekStart calculation around lines 95-97 to use Instant.now(clock) converted
through the Asia/Seoul zone, and reuse that same weekStart at line 117 without
recalculating it.

In `@src/main/java/com/mr/domain/statistics/service/StatisticsService.java`:
- Around line 52-59: StatisticsService의 주 시작일 계산에서 시스템 시간 대신 주입된 clock을 사용하도록
수정하세요. Instant.now(clock)을 KST로 변환한 날짜를 기준으로 thisWeekStart를 계산하고, lastWeekStart
및 fourWeeksAgoStart의 기존 파생 로직은 유지하세요. 고정 시각 기준으로 StatisticsServiceTest의 저장소 기대값을
2026-07-26T15:00:00Z 주 경계에 맞게 갱신하세요.

In `@src/main/resources/application.yml`:
- Around line 9-22: Update the datasource migration configuration around flyway
and jpa so Flyway is enabled and deployment environments use schema validation
instead of automatic updates. Add a versioned migration for the
LocalDateTime-to-Instant change that converts existing timestamp columns to
timestamptz using the explicitly required source timezone, including correction
of existing data before enforcing the new schema.
- Around line 60-66: application.yml의 aws.s3 설정에 S3Properties.keyPrefix()가 기대하는
aws.s3.key-prefix 계약을 반영하세요. keyPrefix가 선택 사항이면 사용할 기본값을 해당 설정에 추가하고, 필수 값이면 누락을
방지하도록 설정 예시에 명시하세요. S3ObjectKeyGenerator.generate()가 이 값을 그대로 사용해 유효한 객체 키 접두사를
생성하도록 S3Properties와 설정 키의 이름 및 기본값을 일치시키세요.

In `@src/test/java/com/mr/domain/home/service/HomeServiceTest.java`:
- Around line 148-150: Update the date fixtures in HomeServiceTest methods
around the referenced scenarios to derive every today and yesterday value from
the Asia/Seoul timezone instead of LocalDate.now(). Preserve the existing
KST-midnight conversion and test data offsets while ensuring all attendance and
weekly-boundary fixtures use the same explicit zone.

In `@src/test/java/com/mr/domain/playing/service/PlayingServiceTest.java`:
- Around line 591-594: Update
PlayingService.publishPracticeMilestoneNotification to derive the Seoul local
date from the injected clock.instant() rather than LocalDate.now(kstZone), then
calculate the Monday week start from that date. Preserve the existing week-start
and repository lookup behavior while ensuring the test’s fixed Clock determines
the queried period.

In `@src/test/java/com/mr/domain/statistics/service/StatisticsServiceTest.java`:
- Around line 119-121: The expected UTC instants are constructed with an
incorrect Z offset. In
src/test/java/com/mr/domain/statistics/service/StatisticsServiceTest.java:119-121,
create the KST midnight instant using atStartOfDay(SERVICE_ZONE_ID).toInstant();
in
src/test/java/com/mr/domain/analysis/service/AnalysisRecoverySchedulerTest.java:84,
create the stale cutoff with FIXED_CLOCK.instant().minus(Duration.ofMinutes(2)).

In `@src/test/java/com/mr/domain/user/service/UserProfileServiceTest.java`:
- Line 232: Update the expired-subscription fixture in UserProfileServiceTest so
its end date is in the past, using one shared reference Instant and setting the
end to 10 days before it or 30 days after the start. Keep the existing start
date 40 days before the reference time.

---

Outside diff comments:
In `@src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java`:
- Around line 25-38: 고정된 ISO-8601 문자열 형식이 모든 분석 응답의 Instant 필드에 적용되는지 검증하세요.
AnalysisResultResponseDTO.java의 25-38행과 109-110행,
AnalysisCreateResponseDTO.java의 8-18행, AnalysisStatusResponseDTO.java의 8-28행에
해당하는 playedAt, createdAt, completedAt 및 report.createdAt/updatedAt 필드를
AnalysisControllerTest의 jsonPath 검증으로 실제 “...Z” 값을 확인하고, 필요하면 JsonFormat 등으로 직렬화
계약을 명시하세요.

In `@src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java`:
- Around line 44-48: AnalysisStateServiceTest의 PROCESSING_STARTED_AT과
FIXED_CLOCK이 동일한 순간을 가리키도록 수정하세요. 기존 Asia/Seoul 기준 2026-07-31 12:00 의도를 유지하려면
PROCESSING_STARTED_AT을 2026-07-31T03:00:00Z로 맞추고, 그렇지 않으면 FIXED_CLOCK을 12:00Z로
변경하세요.

---

Nitpick comments:
In `@src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java`:
- Around line 103-105: Update the cutoff initialization in
AnalysisStateServiceTest to use FIXED_CLOCK.instant() instead of Instant.now().
Keep the existing processing-start timestamp relationship by deriving it from
the fixed cutoff.

In `@src/test/java/com/mr/domain/auth/service/AuthTransactionServiceTest.java`:
- Line 91: AuthTransactionServiceTest에서
tokenProvider.getRefreshTokenExpiryTime()에 전달하는 Instant를 고정된 변수로 저장하고,
updateRefreshToken 검증의 any(Instant.class)를 해당 변수에 대한 eq 검증으로 변경하세요. 이를 통해 갱신 토큰
만료 시각이 정확히 전달되는지 검증하고 기존 토큰 관련 검증은 유지하세요.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ae5c2413-b455-480d-bb5a-181c9f8f28df

📥 Commits

Reviewing files that changed from the base of the PR and between 26c6c0a and cf6f311.

📒 Files selected for processing (71)
  • src/main/java/com/mr/Application.java
  • src/main/java/com/mr/domain/analysis/dto/res/AnalysisCreateResponseDTO.java
  • src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java
  • src/main/java/com/mr/domain/analysis/dto/res/AnalysisStatusResponseDTO.java
  • src/main/java/com/mr/domain/analysis/entity/Analysis.java
  • src/main/java/com/mr/domain/analysis/model/AnalysisProcessingClaim.java
  • src/main/java/com/mr/domain/analysis/repository/AnalysisRepository.java
  • src/main/java/com/mr/domain/analysis/scheduler/AnalysisRecoveryScheduler.java
  • src/main/java/com/mr/domain/analysis/service/AnalysisProcessingService.java
  • src/main/java/com/mr/domain/analysis/service/AnalysisStateService.java
  • src/main/java/com/mr/domain/auth/entity/SocialAuth.java
  • src/main/java/com/mr/domain/auth/service/AuthTransactionService.java
  • src/main/java/com/mr/domain/backingtrack/dto/res/BackingTrackCreateResponseDTO.java
  • src/main/java/com/mr/domain/backingtrack/dto/res/BackingTrackUpdateResponseDTO.java
  • src/main/java/com/mr/domain/backingtrack/repository/BackingTrackRepository.java
  • src/main/java/com/mr/domain/backingtrack/service/BackingTrackService.java
  • src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
  • src/main/java/com/mr/domain/history/dto/res/HistoryListResponseDTO.java
  • src/main/java/com/mr/domain/history/service/HistoryService.java
  • src/main/java/com/mr/domain/home/dto/res/HomeResponseDTO.java
  • src/main/java/com/mr/domain/home/service/HomeService.java
  • src/main/java/com/mr/domain/learning/dto/res/LearningResultResponseDTO.java
  • src/main/java/com/mr/domain/learning/entity/UserLearningProgress.java
  • src/main/java/com/mr/domain/learning/service/LearningService.java
  • src/main/java/com/mr/domain/mentor/dto/res/MentorMessageHistoryResponseDTO.java
  • src/main/java/com/mr/domain/mentor/dto/res/MentorStreamEventDTO.java
  • src/main/java/com/mr/domain/mentor/entity/MentorChatSession.java
  • src/main/java/com/mr/domain/notification/dto/res/NotificationResponseDTO.java
  • src/main/java/com/mr/domain/notification/repository/NotificationRepository.java
  • src/main/java/com/mr/domain/notification/service/NotificationEventListener.java
  • src/main/java/com/mr/domain/playing/dto/res/AnalysisContextResponse.java
  • src/main/java/com/mr/domain/playing/dto/res/PlayingDeleteResponse.java
  • src/main/java/com/mr/domain/playing/dto/res/PlayingDetailResponse.java
  • src/main/java/com/mr/domain/playing/dto/res/PlayingStartResponse.java
  • src/main/java/com/mr/domain/playing/entity/Playing.java
  • src/main/java/com/mr/domain/playing/repository/PlayingRepository.java
  • src/main/java/com/mr/domain/playing/service/PlayingService.java
  • src/main/java/com/mr/domain/statistics/entity/UserStatistics.java
  • src/main/java/com/mr/domain/statistics/service/StatisticsAggregationService.java
  • src/main/java/com/mr/domain/statistics/service/StatisticsService.java
  • src/main/java/com/mr/domain/subscriptions/entity/Subscription.java
  • src/main/java/com/mr/domain/user/dto/res/UserProfileResponseDTO.java
  • src/main/java/com/mr/domain/user/service/UserProfileService.java
  • src/main/java/com/mr/domain/weakness/entity/WeaknessNote.java
  • src/main/java/com/mr/global/entity/BaseCreatedDeletedEntity.java
  • src/main/java/com/mr/global/entity/BaseCreatedEntity.java
  • src/main/java/com/mr/global/entity/BaseTimeDeletedEntity.java
  • src/main/java/com/mr/global/entity/BaseTimeEntity.java
  • src/main/java/com/mr/global/file/s3/service/S3ObjectKeyGenerator.java
  • src/main/java/com/mr/global/security/jwt/JwtTokenProvider.java
  • src/main/java/com/mr/global/util/RelativeDateFormatter.java
  • src/main/resources/application.yml
  • src/test/java/com/mr/domain/analysis/controller/AnalysisControllerTest.java
  • src/test/java/com/mr/domain/analysis/entity/AnalysisTest.java
  • src/test/java/com/mr/domain/analysis/service/AnalysisProcessingServiceTest.java
  • src/test/java/com/mr/domain/analysis/service/AnalysisRecoverySchedulerTest.java
  • src/test/java/com/mr/domain/analysis/service/AnalysisServiceTest.java
  • src/test/java/com/mr/domain/analysis/service/AnalysisStateServiceTest.java
  • src/test/java/com/mr/domain/auth/service/AuthTransactionServiceTest.java
  • src/test/java/com/mr/domain/backingtrack/controller/BackingTrackControllerTest.java
  • src/test/java/com/mr/domain/history/controller/HistoryControllerTest.java
  • src/test/java/com/mr/domain/history/service/HistoryServiceTest.java
  • src/test/java/com/mr/domain/home/service/HomeServiceTest.java
  • src/test/java/com/mr/domain/mentor/controller/MentorControllerTest.java
  • src/test/java/com/mr/domain/mentor/service/MentorServiceTest.java
  • src/test/java/com/mr/domain/playing/entity/PlayingTest.java
  • src/test/java/com/mr/domain/playing/service/PlayingServiceTest.java
  • src/test/java/com/mr/domain/statistics/service/StatisticsAggregationServiceTest.java
  • src/test/java/com/mr/domain/statistics/service/StatisticsServiceTest.java
  • src/test/java/com/mr/domain/user/controller/UserProfileControllerTest.java
  • src/test/java/com/mr/domain/user/service/UserProfileServiceTest.java

Comment thread src/main/java/com/mr/domain/home/dto/res/HomeResponseDTO.java
Comment thread src/main/java/com/mr/domain/learning/dto/res/LearningResultResponseDTO.java Outdated
Comment thread src/main/resources/application.yml
Comment thread src/test/java/com/mr/domain/home/service/HomeServiceTest.java Outdated
Comment thread src/test/java/com/mr/domain/playing/service/PlayingServiceTest.java
Comment thread src/test/java/com/mr/domain/statistics/service/StatisticsServiceTest.java Outdated
Comment thread src/test/java/com/mr/domain/user/service/UserProfileServiceTest.java Outdated
Comment thread src/main/java/com/mr/domain/analysis/entity/Analysis.java

@on1yoneprivate on1yoneprivate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

@ownue ownue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원정님 코드 리뷰 반영만 되면 더 고칠 점은 없는 것 같습니다! 수고하셨어요~!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/resources/db/migration/V7__alter_analysis_time_columns_to_timestamptz.sql`:
- Around line 2-3: V7 마이그레이션 버전 충돌을 해소하도록 두 마이그레이션 중 하나의 버전을 고유한 다음 버전으로 변경하세요.
processing_started_at 변환에서는 복제본과 기존 저장 로직의 레거시 시간 기준을 확인한 뒤, UTC 기준이면 Asia/Seoul
보정을 제거하고 UTC에 맞게 변환하며, 기준이 혼재하면 출처별 보정을 적용하세요.
- Around line 1-7: Resolve the duplicate Flyway V7 migration by renaming one
migration to an unused version, then combine the processing_started_at and
created_at conversions in the same ALTER TABLE statement. Preserve the existing
Asia/Seoul USING conversion after verifying it matches the legacy timestamp
basis, and configure the migration’s operational execution with an appropriate
maintenance window and lock_timeout.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 848de5d2-f4e0-4f2a-afd4-103ad3ae85a9

📥 Commits

Reviewing files that changed from the base of the PR and between 25f890a and 05dbfd9.

📒 Files selected for processing (14)
  • src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java
  • src/main/java/com/mr/domain/backingtrack/service/BackingTrackService.java
  • src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
  • src/main/java/com/mr/domain/history/service/HistoryService.java
  • src/main/java/com/mr/domain/playing/dto/res/AnalysisContextResponse.java
  • src/main/java/com/mr/domain/playing/dto/res/PlayingStartResponse.java
  • src/main/java/com/mr/domain/playing/service/PlayingService.java
  • src/main/java/com/mr/global/file/s3/service/S3ObjectKeyGenerator.java
  • src/main/resources/application.yml
  • src/main/resources/db/migration/V7__alter_analysis_time_columns_to_timestamptz.sql
  • src/test/java/com/mr/domain/analysis/service/AnalysisServiceTest.java
  • src/test/java/com/mr/domain/backingtrack/controller/BackingTrackControllerTest.java
  • src/test/java/com/mr/domain/history/service/HistoryServiceTest.java
  • src/test/java/com/mr/domain/playing/service/PlayingServiceTest.java
🚧 Files skipped from review as they are similar to previous changes (13)
  • src/test/java/com/mr/domain/analysis/service/AnalysisServiceTest.java
  • src/main/java/com/mr/domain/playing/dto/res/PlayingStartResponse.java
  • src/test/java/com/mr/domain/playing/service/PlayingServiceTest.java
  • src/main/java/com/mr/domain/playing/service/PlayingService.java
  • src/main/java/com/mr/domain/history/dto/res/HistoryDetailResponseDTO.java
  • src/main/java/com/mr/domain/history/service/HistoryService.java
  • src/main/java/com/mr/domain/backingtrack/service/BackingTrackService.java
  • src/main/java/com/mr/domain/analysis/dto/res/AnalysisResultResponseDTO.java
  • src/main/java/com/mr/global/file/s3/service/S3ObjectKeyGenerator.java
  • src/test/java/com/mr/domain/backingtrack/controller/BackingTrackControllerTest.java
  • src/main/java/com/mr/domain/playing/dto/res/AnalysisContextResponse.java
  • src/test/java/com/mr/domain/history/service/HistoryServiceTest.java
  • src/main/resources/application.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/resources/db/migration/V8__alter_analysis_time_columns_to_timestamptz.sql (1)

1-3: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

대용량 analysis 테이블의 잠금과 rewrite를 배포 계획에 반영하세요.

Line 2-3은 값 변환을 포함한 컬럼 타입 변경입니다. PostgreSQL은 이런 타입 변경에서 테이블과 인덱스를 재작성할 수 있으며, 대용량 테이블에서는 상당한 시간과 추가 디스크 공간이 필요할 수 있습니다. Squawk도 ACCESS EXCLUSIVE 잠금을 보고했습니다. 운영 중에는 AnalysisRepository 조회와 AnalysisRecoveryScheduler 작업이 차단될 수 있습니다. (postgresql.org)

운영 규모의 데이터베이스 clone에서 실행 시간, 필요한 디스크 공간, 잠금 대기 시간을 측정하세요. 이후 점검 시간대, lock_timeout, 실패 시 rollback 절차를 정한 뒤 배포하세요. 온라인 변경이 필요하면 expand/backfill/swap 방식으로 마이그레이션을 재설계하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/resources/db/migration/V8__alter_analysis_time_columns_to_timestamptz.sql`
around lines 1 - 3, Document the operational migration plan for the ALTER TABLE
statements in V8, including clone-based measurements of execution time, disk
usage, and lock wait duration, plus a maintenance window, lock_timeout, and
rollback procedure. If production downtime is unacceptable, redesign the
processing_started_at and created_at conversion using an expand/backfill/swap
approach.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@src/main/resources/db/migration/V8__alter_analysis_time_columns_to_timestamptz.sql`:
- Around line 1-3: Document the operational migration plan for the ALTER TABLE
statements in V8, including clone-based measurements of execution time, disk
usage, and lock wait duration, plus a maintenance window, lock_timeout, and
rollback procedure. If production downtime is unacceptable, redesign the
processing_started_at and created_at conversion using an expand/backfill/swap
approach.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: acfb143a-3df3-4ced-a631-c62cb8d136de

📥 Commits

Reviewing files that changed from the base of the PR and between 05dbfd9 and 5f5a761.

📒 Files selected for processing (1)
  • src/main/resources/db/migration/V8__alter_analysis_time_columns_to_timestamptz.sql

@rkdehdrbs7885-oss
rkdehdrbs7885-oss merged commit 61692f4 into develop Aug 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚙️ Setting - 날짜 및 시간 UTC 기준 통일

3 participants