Conversation
|
Caution Review failedThe pull request is closed. WalkthroughGitHub Actions 배포 워크플로우와 docker-compose-prod를 추가하고, 매치/드래프트 타임아웃 처리 및 배정 조회 기능을 도입했습니다. WebSocket 인증(핸드셰이크/세션 관리)과 스케줄러 기반 타임아웃 배치가 추가되었고, 플레이어 캐시/검색(Redis+Elasticsearch) API와 보안/설정 일부가 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant WS as WebSocket Server
participant Auth as AuthHandshakeHandler
participant JWT as JwtTokenProvider
participant MH as MatchHandler
Client->>WS: Connect (optional ?token=Bearer x)
WS->>Auth: determineUser(request)
Auth->>Auth: check SecurityContext
alt no Principal
Auth->>JWT: validate & getAuthentication(token)
JWT-->>Auth: Authentication or null
end
Auth-->>WS: Principal or null
alt authenticated
WS->>MH: afterConnectionEstablished(session, userId)
MH-->>Client: USER_ID, STATUS
else unauthenticated
WS-->>Client: reject
end
sequenceDiagram
participant Scheduler
participant Proc as MatchTimeoutProcessor
participant Redis
participant DB as Repos(DB)
participant WS as MatchHandler
Scheduler->>Proc: processTimeoutAndInsert()
Proc->>Redis: SMEMBERS match:session
alt empty
Proc-->>Scheduler: {}
else has users
Proc->>Proc: group by 4 & pad DUMMY
Proc->>DB: find Round(getNextDraftWindow)
Proc->>DB: save Draft + Participants
Proc->>Redis: SREM used real userIds
Proc-->>Scheduler: {userId -> AssignDto}
loop for each user
Scheduler->>WS: notifyDraftStart(userId, draftId, userNumber)
WS-->>WS: send DRAFT_START to latest session
end
end
sequenceDiagram
participant Admin as Admin/Job
participant API as PlayerCacheController
participant S as PlayerCacheService
participant DB as PlayerRepository
participant ES as PlayerEsService
participant R as Redis
Admin->>API: POST /api/playerCache/cache
API->>S: loadPlayersToRedis()
S->>DB: findAllWithTeamAndElementType()
S->>R: SETEX players:all (List<PlayerDto>)
S->>ES: saveAll(PlayerEsDocument list)
API-->>Admin: 200 OK
participant User
User->>API: GET /api/playerCache
API->>S: getPlayersFromRedis()
S->>R: GET players:all
alt hit
R-->>S: List<PlayerDto>
else miss
S->>DB: findAll...
S->>R: SETEX players:all
end
S-->>API: List<PlayerDto>
API-->>User: 200 OK (list)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (36)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
원중님 살려주세요
Summary by CodeRabbit