Refactor: 예약 요청 저장 로직 수정#33
Merged
daeyoung0726 merged 6 commits intomainfrom Aug 21, 2025
Merged
Conversation
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.
개요
→ 클라이언트측에서 예약자는 예약 요청을 막아 예약을 한 인원이 요청을 보낼 확률이 적음 → 불필요 조회 로직 발생 많아짐
구현사항
중복 예약 방지를 위한 필드 추가 (유니크 속성에 사용) (6c339e1)
사용자 정보,가게 정보,날짜,예약 활성화 여부를 통해 Unique 설정1. 가게 예약 성공 → 예약 활성화 여부(active_flag)가 true로 설정 → 유니크 속성으로 중복 예약 방지
2. 가게 예약 취소 및 입장 → 예약 활성화 여부(active_flag)가 null로 설정 → DB에서 null은 unknown이기에 유니크 속성 동작 x → 다시 예약 가능
예약 중복 저장시, 예외 발생 (dfefee2)
시간대 예약 락 범위 축소 (가게 + 예약 날짜 + 시간대) (8bcb4f3)