Skip to content

[#29] 예약 신청 - #31

Merged
Kming9 merged 5 commits into
developfrom
feature/29-reservation-create
Nov 22, 2026
Merged

Kming9 merged 5 commits into
developfrom
feature/29-reservation-create

Conversation

@Kming9

@Kming9 Kming9 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

개요

관련 Issue와 작업 목적을 간단히 작성합니다.

작업 내용

주요 변경 사항을 항목별로 작성합니다.

  • 예약 신청 API(POST /api/v1/reservations) 추가
  • 재고 행 비관적 락 적용
    • 예약 신청과 공연 정보 수정 모두 재고 행을 먼저 잠그도록 변경
    • 공연 정보 수정에 사용하던 공연 행 락을 재고 행 락으로 대체
    • 락 대기 시간을 3초로 제한하고 초과 시 503 STOCK_BUSY 반환
  • 기능정의서, 유스케이스 수정 및 상세 API 명세 반영

테스트

작성한 테스트와 실행 결과를 작성합니다.

  • 예약 성공 시 예약 저장과 재고 차감 확인
  • 요청값, 판매 기간, 잔여 수량 검증 및 오류 판정 순서 확인
  • 예약 vs 예약: 동시에 요청해도 총 판매 수량을 넘지 않는지 확인
  • 공연 수정 vs 예약: 동시에 요청해도 예약 수량과 판매 기간 규칙이 지켜지는지 확인
  • 공연 수정 vs 공연 수정: 공연 행 락을 제거한 뒤에도 같은 버전의 동시 수정은 하나만 반영되는지 확인
  • 재고 락 대기 시간 초과 시 STOCK_BUSY 반환 확인

참고 사항

리뷰어가 알아야 할 사항이나 추가 확인이 필요한 내용을 작성합니다.

  • 공연 수정과 예약 신청이 공통으로 영향을 주는 재고 행을 락 기준으로 사용해 두 작업이 순차적으로 처리되도록 했습니다.
  • innodb_lock_wait_timeout 값은 부하 테스트로 정해야 하는지 판단이 어려워 우선 아래 자료를 참고해 3초로 설정했습니다.
  • 초기 기능정의서에는 예약 금액을 저장하기로 했으나 예약 금액은 단가와 수량으로 계산할 수 있어 별도로 저장하지 않는 방향으로 수정했습니다. (기능정의서 4.9.1.4)
  • 예약 조회 기능은 다음 PR에서 진행하겠습니다.

@Kming9
Kming9 requested a review from roam-f-lab November 19, 2026 16:29
@Kming9 Kming9 self-assigned this Nov 19, 2026
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b5c939f-db89-410c-a401-69e509a28693
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@Kming9
Kming9 requested a review from roam-f-lab November 20, 2026 02:56
@sonarqubecloud

Copy link
Copy Markdown

@roam-f-lab roam-f-lab left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

동시성 테스트 시나리오에서 스레드 대기에 타임아웃 처리가 없는 부분은 추가 체크해 주세요.

@Kming9
Kming9 merged commit 85408b3 into develop Nov 22, 2026
4 checks passed
@Kming9
Kming9 deleted the feature/29-reservation-create branch November 22, 2026 10:54
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