Merged
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough대기 작업의 멱등성 검증 및 진행 중 상태 처리를 도입합니다. 새로운 예외 처리, 멱등성 응답 및 대기 정보 DTO 생성, 멱등성 서비스 계층 리팩토링, 그리고 사용자 대기 정보 조회 API 엔드포인트를 구현합니다. Changes
Sequence DiagramsequenceDiagram
actor Client
participant WaitingController
participant IdempotencyService
participant WaitingIdempotencyRepository as Redis<br/>IdempotencyRepository
participant WaitingService
participant Database
Client->>WaitingController: POST /register with Idempotency-Key
WaitingController->>IdempotencyService: validateIdempotency(request)
IdempotencyService->>WaitingIdempotencyRepository: findByRegisterKey(key)
alt Idempotency Key Found
WaitingIdempotencyRepository-->>IdempotencyService: IdempotencyResponse
IdempotencyService->>IdempotencyService: Check state
alt State = IN-PROGRESS
IdempotencyService-->>WaitingController: Throw WorkInProgressException
WaitingController-->>Client: HTTP 409 Conflict
else State = COMPLETED
IdempotencyService-->>WaitingController: Return cached response
WaitingController-->>Client: HTTP 200 with cached data
end
else No Key Found
IdempotencyService->>IdempotencyService: Mark as IN-PROGRESS
IdempotencyService->>WaitingIdempotencyRepository: saveIdempotencyInProgress(key)
IdempotencyService-->>WaitingController: Continue processing
WaitingController->>WaitingService: Process waiting request
WaitingService->>Database: Fetch/create reservation
Database-->>WaitingService: Result
WaitingService-->>WaitingController: Response
WaitingController->>IdempotencyService: saveIdempotencyResponse(key, response)
IdempotencyService->>WaitingIdempotencyRepository: saveIdempotencyResponse(key, response)
WaitingIdempotencyRepository->>WaitingIdempotencyRepository: Store with COMPLETED state
WaitingController-->>Client: HTTP 200 with new data
end
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
Suggested Reviewers
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
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.
작업 요약
Issue Link
#361
문제점 및 어려움
추후 성능 개선 예정
해결 방안
Reference
Summary by CodeRabbit
릴리스 노트
새로운 기능
버그 수정