-
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
Feat/#44/자동 매칭 로직 버그 수정 및 sse 구독 로직 수정 #45
base: dev
Are you sure you want to change the base?
The head ref may contain hidden characters: "feat/#44/\uC790\uB3D9-\uB9E4\uCE6D-\uB85C\uC9C1-\uBC84\uADF8-\uC218\uC815-\uBC0F-SSE-\uAD6C\uB3C5-\uB85C\uC9C1-\uC218\uC815"
Conversation
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.
고생하셨습니다 !!
로직상 문제는 없어보이지만,
수정된 내용 중 몇 가지 궁금한 점이 있어 리뷰를 남겨보았습니다
"FUNCTION('ST_Distance_Sphere', FUNCTION('POINT', :startLongitude, :startLatitude), FUNCTION('POINT', r.route.startLongitude, r.route.startLatitude)) <= :radius " + | ||
"AND FUNCTION('ST_Distance_Sphere', FUNCTION('POINT', :destinationLongitude, :destinationLatitude), FUNCTION('POINT', r.route.endLongitude, r.route.endLatitude)) <= :radius ") | ||
"WHERE " + | ||
"FUNCTION('ST_Distance_Sphere', FUNCTION('POINT', :startLatitude, :startLongitude), FUNCTION('POINT', r.route.startLatitude, r.route.startLongitude)) <= :radius " + |
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.
기존 내용과 비교했을떄, 쿼리에서 startLatitude와 startLongitude의 순서가 수정된 것을 확인했습니다
저는 기존 기능과 동일하게 작동할 것으로 생각했는데, 혹시 순서 변경이 성능 개선이나 버그 수정 등
다른 목적이 있었는지 궁금합니다. 만약 제가 이해하지 못한 부분이라면, 변경하신 의도에 대해 간단히 공유해 주실 수 있을까요 ??
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.
SQL에서는 latitude, longitude 순서로 파라미터를 받아요!!
순서가 바뀌면 경도 (0360) 값이 위도 (-9090) 값으로 잘못 들어가게되어 SqlException이 발생합니다!!
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.
아아 확인했습니당
this.sseService.sendToClient( | ||
event.roomMasterId(), | ||
"MATCH_ROOM_CREATED", | ||
MatchRoomCreatedEvent.of(event, roomId) | ||
); |
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.
해당 부분이 아래의 코멘트에서 얘기했었던 부분입니다 !
매칭방 생성시, SSE로 클라이언트에게 방장의 ID까지 포함시켜서 반환해주는 플로우로 이해했습니다
@@ -49,7 +49,7 @@ public class MatchingRoomService { | |||
// event factory | |||
private final MatchingEventFactory matchingEventFactory; | |||
|
|||
public void createMatchingRoom(MatchRoomCreatedEvent matchRoomCreatedEvent) { | |||
public Long createMatchingRoom(MatchRoomCreatedEvent matchRoomCreatedEvent) { |
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.
기존에 void였던 반환 타입이 Long으로 변경된건, 새로생성된 MatchingRoom의 방장의 ID를 방 생성시, 이벤트에 포함해서 함께 반환해주기 위함으로 이해했는데 맞을까요 ??
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.
코드만 봤을 때는 문제는 없어 보여요!
실제 테스트 방식이나 영상을 pr에 첨부해주셔도 좋을 것 같아요!
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.
고생하셨습니다 !
📌 관련 이슈
관련 이슈 번호 #44
Close #44
🚀 작업 내용
📸 스크린샷
📢 리뷰 요구사항