-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTB-76 [feat] 웨이팅 신청 방식 변경 #89
Conversation
BASIC(1~5), PARTY(5~8)로 구분
인원수 -> 테이블 종류
인원수 -> 테이블 종류
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!! 최대 주점 예약인원을 파악 할 때 동시성 문제가 발생 할 수 있는 부분도 잘 관리된 것 같아요 :) 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 전반적으로 코드가 잘 구현이 되어있는 것 같습니다!!!
코드를 보다가 궁금한 점을 달아 두었는데, 한번 읽어보시고 의견 부탁드립니다!
private void checkMaxWaitingCount() { | ||
if (this.waitingCount >= MAX_WAITING_COUNT) { | ||
this.waitingStatus = false; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
웨이팅을 30개로 제한을 두는 부분을 추가하신 이유가 있으실까요? 정책이 변경된 건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그렇습니다! 해당 부분 노션에 정리되어 있으니 확인 부탁드립니다 😄
tableId -> seatingId
tableNum -> seatingNum
1. 무슨 이유로 코드를 변경했나요?
AS-IS
headCount
에 인원수 값을 입력하여 진행합니다.TO-BE
2. 어떤 위험이나 장애를 발견했나요?
Seating
객체를 불러오지 못해 의도치 않은 NPE가 발생하는 것을 파악,수정하였습니다.
3. 관련 스크린샷을 첨부해주세요.
원격 웨이팅
주점 관리자 대기열 조회 시
사용자 웨이팅 내역 조회 오류 수정
4. 완료 사항
BASIC
,PARTY
로 설정하여 웨이팅을 신청하도록 변경하였습니다.이슈 번호
close #88
5. 추가 사항
🤔 Seating 유무에 따른 로직을 어떻게 구성해야할까?
고민했던 방식은 총 2가지였습니다.Optional
을 사용한 로직Seating
유무에 따라 분기점을 두고 있습니다. (orElseGet)if-early return
을 사용한 로직결론
해당 오류는 입장한 웨이팅과 취소된 웨이팅을 적절히 구분하지 못하고 하나의 로직으로 처리하려다가 발생한 문제였습니다.
따라서
Seating
을 기준으로 로직을 분리하는 것은 옿지 않다고 판단하였고, @hoonyworld 님도 해당 부분을 지적해주셨습니다.따라서 기존 의도대로 웨이팅의 상태(입장함 | 취소함)를 기반으로 분기점을 생성하는 것이 낫다고 판단, 그렇게 적용하였습니다.
정책 변경에 따른 주점당 최대 웨이팅 수 적용
대기 마감
으로 변경됩니다.