Skip to content

Fix/알림이 10분 뒤에 도착하는 문제 해결#19

Merged
GoGradually merged 10 commits intomasterfrom
fix/알림이-10분-뒤에-도착하는-문제
Feb 7, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/\uc54c\ub9bc\uc774-10\ubd84-\ub4a4\uc5d0-\ub3c4\ucc29\ud558\ub294-\ubb38\uc81c"
Merged

Fix/알림이 10분 뒤에 도착하는 문제 해결#19
GoGradually merged 10 commits intomasterfrom
fix/알림이-10분-뒤에-도착하는-문제

Conversation

@GoGradually
Copy link
Collaborator

변경된 점

  • 시간대 비교 로직을 UTC 기준 TIMESTAMP 비교로 변경

Copilot AI review requested due to automatic review settings February 7, 2026 18:42
@GoGradually GoGradually merged commit 9ed3287 into master Feb 7, 2026
3 checks passed
@GoGradually GoGradually deleted the fix/알림이-10분-뒤에-도착하는-문제 branch February 7, 2026 18:42
@GoGradually GoGradually changed the title Fix/알림이 10분 뒤에 도착하는 문제 Fix/알림이 10분 뒤에 도착하는 문제 해결 Feb 7, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

알림이 “10분 늦게” 도착하는 문제를 해결하기 위해, 일정 시작 시간 비교/저장 방식을 문자열 기반(시간대/포맷 혼재 가능)에서 UTC 기준 TIMESTAMP(Instant) 비교로 전환한 변경입니다.

Changes:

  • scheduleStartTime을 도메인/영속 계층 전반에서 StringInstant로 변경하고 비교 로직을 Instant 기반으로 통일
  • JDBC 조회 쿼리에서 due 조건 파라미터를 String(now.toString())Timestamp.from(now)로 변경
  • Hibernate JDBC time zone을 UTC로 고정하고(환경별 yml), UTC 초 단위 정규화를 위한 ScheduleStartTimeFormatter 및 관련 테스트 추가

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/resources/application-dev.yml Hibernate JDBC time zone을 UTC로 고정
src/main/resources/application-prod.yml Hibernate JDBC time zone을 UTC로 고정
src/test/resources/application-test.yml 테스트 환경에서도 Hibernate JDBC time zone을 UTC로 고정
src/main/java/me/pinitnotification/domain/shared/ScheduleStartTimeFormatter.java UTC 초 단위 포맷/파싱/정규화 유틸 추가
src/main/java/me/pinitnotification/domain/notification/UpcomingScheduleNotification.java 도메인 모델의 시작 시간 타입을 Instant로 변경 및 비교 단순화
src/main/java/me/pinitnotification/domain/notification/UpcomingScheduleNotificationRepository.java 저장소 업데이트 API를 Instant 기반으로 변경
src/main/java/me/pinitnotification/application/notification/ScheduleNotificationService.java 생성/업데이트 시 시작 시간을 Instant로 처리하고 designatedStartTime 문자열을 파싱
src/main/java/me/pinitnotification/infrastructure/grpc/ScheduleGrpcClient.java gRPC Timestamp → UTC 초 단위 ISO 문자열로 포맷 통일
src/main/java/me/pinitnotification/infrastructure/persistence/notification/UpcomingScheduleNotificationEntity.java JPA 엔티티의 시작 시간 타입을 Instant로 변경
src/main/java/me/pinitnotification/infrastructure/persistence/notification/UpcomingScheduleNotificationJpaRepository.java 업데이트 쿼리 파라미터 타입을 Instant로 변경
src/main/java/me/pinitnotification/infrastructure/persistence/notification/UpcomingScheduleNotificationRepositoryAdapter.java 어댑터 업데이트 API를 Instant 기반으로 변경
src/main/java/me/pinitnotification/infrastructure/persistence/notification/NotificationDispatchQueryRepositoryAdapter.java due 조회 시 Timestamp 파라미터 사용 및 결과를 Instant로 매핑
src/test/java/me/pinitnotification/... 타입 변경 반영 + “startTime == now” 포함 경계 케이스/포맷터 테스트 추가

Comment on lines 38 to 40
@Column(name = "schedule_start_time", nullable = false)
private String scheduleStartTime;
private Instant scheduleStartTime;
@Column(name = "idempotent_key", nullable = false)
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

(1) 문제점: schedule_start_time 컬럼 매핑이 StringInstant로 변경되어 JPA가 DB 컬럼을 TIMESTAMP/DATETIME 계열로 기대하게 됩니다. 현재 prod 설정이 ddl-auto: validate라서 운영 DB 스키마가 즉시 반영되지 않으면 애플리케이션이 기동 단계에서 스키마 검증 실패로 내려갈 수 있습니다.
(2) 영향: 운영 배포 시 서비스 기동 불가(또는 dev에서는 자동 스키마 변경으로 데이터/인덱스 변환이 발생) 가능성이 있으며, 기존 VARCHAR 데이터가 있다면 변환 과정에서 파싱 실패/값 손실 위험이 있습니다.
(3) 수정 제안: 이 변경과 함께 명시적인 DB 마이그레이션(예: ALTER TABLE ... MODIFY schedule_start_time TIMESTAMP(6) ... + 기존 문자열 데이터를 UTC TIMESTAMP로 변환)과 배포 순서(선-스키마, 후-애플리케이션)를 PR에 포함하거나, 최소한 운영 반영 절차를 문서/릴리즈 노트로 남겨주세요.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants