Skip to content

fix: 일정 생성 버전 충돌 방지 - #21

Merged
Heyaaz merged 1 commit into
mainfrom
fix/schedule-generation-version-lock
May 20, 2026
Merged

fix: 일정 생성 버전 충돌 방지#21
Heyaaz merged 1 commit into
mainfrom
fix/schedule-generation-version-lock

Conversation

@Heyaaz

@Heyaaz Heyaaz commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • 일정 생성 500 오류 방지

Changes

  • 방 단위 비관적 락 기반 일정 버전 할당
  • 동시 생성 저장 시 버전 충돌 회피
  • 동시 저장 회귀 테스트 추가

Verification

  • Not run
  • Build
  • Test ./gradlew test --tests 'com.tripsync.application.schedule.ScheduleServiceTest' --no-daemon
  • Test ./gradlew cleanTest test --no-daemon
  • Manual

Notes

@Heyaaz Heyaaz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Nogada PR Review

Verdict

✅ Blocking 이슈 없음. 병합 가능해 보입니다.

확인한 내용

  • ScheduleGenerationPersistenceService.saveGeneratedOptions에서 방 row를 PESSIMISTIC_WRITE로 잠근 뒤 최신 schedule version을 계산하도록 바뀐 점 확인했습니다.
  • 같은 방에 동시 일정 생성 저장이 들어와도 version이 중복되지 않도록 TripRoomRepository.findActiveByIdForUpdate가 추가된 점 확인했습니다.
  • 동시 저장 회귀 테스트가 version 2, 3, 4, 5를 검증하도록 추가된 점 확인했습니다.

검증

  • ./gradlew clean test --no-daemon --no-build-cache 성공
  • 테스트 XML 기준: 61 tests / 0 failures / 0 errors / 0 skipped
  • git diff --check origin/main...HEAD 통과

참고

  • 테스트 종료 시 Testcontainers/Hikari/PostgreSQL shutdown warning이 출력됐지만, Gradle 결과와 XML 요약은 정상 성공이라 blocking으로 보지 않았습니다.

[Heyaaz의 Nogada]

@Heyaaz
Heyaaz merged commit 83f8d14 into main May 20, 2026
1 check passed
@Heyaaz
Heyaaz deleted the fix/schedule-generation-version-lock branch May 20, 2026 13:26
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.

1 participant