Repository navigation
[refactor/#740] 게임 생성 시 보드 브로드캐스트 비동기로 처리하도록 수정 - #753
Merged
Merged
Conversation
Dimo-2562
reviewed
Sep 29, 2026
| event, | ||
| GameRealtimeProtocol.TYPE_BOARD_UPDATED, | ||
| () -> gameBoardBroadcaster.broadcastBoardUpdate( | ||
| event.gameBoardId(), boardDto.forBroadcast(), null)); |
Contributor
There was a problem hiding this comment.
여기서 자기 세션까지 포함해서 브로드 캐스트를 진행하는데, GAME_CREATED ACK와 브로드 캐스트를 요청자는 모두 받는 구조입니다.
현재 isGameHost가 본인 요청 ACK에는 true로 오지만, 브로드 캐스트로 받은 것은 false이므로 잘못된 값이 적용될 수 있습니다! 세션을 넘겨서 브로드캐스트를 요청자는 빼는 방안은 어떨까요?
Contributor
Author
There was a problem hiding this comment.
이거를 구현할 때도 고민을 했었는데, 프론트에 확인해보니까 isGameHost 필드를 사용하고있지 않다고 합니다! 그래서 요청자가 브로드캐스트를 함께 받더라도 잘못된 값이 적용되지는 않을 거 같아요
차라리 742번 이슈를 해결하면서 isGameHost 필드를 제거하는 방향으로 하는게 어떨까 싶습니다! 순서 관련 이슈도 해결하고나면 지금 방식을 유지하는 게 나을 거 같다고 생각했습니다!
Dimo-2562
reviewed
Sep 29, 2026
Dimo-2562
left a comment
Contributor
There was a problem hiding this comment.
스냅샷 순서가 잘못 적용되는 문제는 PR에서 추후에 적용해준다고 작성해주셔서 인지하고 있겠습니다!! 수고하셨습니다~
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.
❤️ 기능 설명
문제 원인
WS
CREATE_GAME핸들러가 한 스레드(Tomcat worker)에서 아래를 모두 동기로 처리해, 구독자가 많을수록/연속 조작 시 딜레이가 누적되는 문제가 있었습니다.createGame()쓰기 TX (게임판 락 + 커밋)getBoard()보드 재조회 -> 1의 활성 게임 조회와 중복된 별도 읽기 TXGAME_CREATED응답broadcastBoardUpdate()-> Redis SMEMBERS + 구독 세션마다 직렬화/전송변경 후
createGame()TX →GAME_CREATED응답 만 수행createGameTX 안에서 이미 조회한 활성 게임 + 새 게임으로 조립해 반환 (재조회 제거)BOARD_UPDATED/MEMBERS_UPDATED전파연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #740
🩷 Approve 하기 전 확인해주세요!
✅ 체크리스트