[FEAT] 바이낸스 api 재연결 기능 추가 - #90
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 110 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBinance WebSocket 클라이언트가 단일 연결 방식에서 재연결 관리 방식으로 변경되었습니다. 클라이언트는 현재 연결과 연결 상태를 추적합니다. 서버 종료 이벤트, 연결 종료, 오류 발생 시 지수 백오프와 지터를 사용해 재연결합니다. 연결 성공 후 약 23시간 50분 뒤 선제적 재연결을 예약합니다. Estimated code review effort: 4 (Complex) | ~45 minutes Mergeability Score: 🟠 High · up to 재연결 로직이 이전 WebSocket의 늦은 콜백과 대기 중인 재연결 작업을 차단하지 않아 정상 연결이 예기치 않게 교체되거나 종료될 수 있습니다. 이로 인해 실시간 데이터 수집이 중단될 수 있으므로, 현재 상태로는 병합 전에 수명주기 검증과 예약 작업 취소를 보완해야 합니다. Sequence Diagram(s)sequenceDiagram
participant BinanceWebSocketClient
participant WebSocketClient
participant ScheduledExecutorService
BinanceWebSocketClient->>WebSocketClient: 연결 생성
WebSocketClient-->>BinanceWebSocketClient: 연결 성공
BinanceWebSocketClient->>ScheduledExecutorService: 선제적 재연결 예약
WebSocketClient-->>BinanceWebSocketClient: 서버 종료 또는 오류 전달
BinanceWebSocketClient->>ScheduledExecutorService: 백오프 재연결 예약
ScheduledExecutorService->>BinanceWebSocketClient: 재연결 실행
BinanceWebSocketClient->>WebSocketClient: 기존 클라이언트 종료
BinanceWebSocketClient->>WebSocketClient: 새 클라이언트 연결
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java`:
- Around line 73-76: Update BinanceWebSocketClient.onOpen so it acquires
lifecycleLock and proceeds only when not stopped and client == this; only then
reset reconnect state and call scheduleProactiveReconnect. Store the delayed
reconnect ScheduledFuture and cancel and clear it when the current client opens,
preventing stale queued reconnects from replacing the active connection.
Apply the same fix in
`@backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java`
around lines 74 - 75: The same stale-callback and uncancelled-reconnect-task
race is covered by the consolidated comment.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 243b6eeb-15a7-496b-af44-7b72bdf8dbce
📒 Files selected for processing (1)
backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java
📌 Summary
바이낸스 api 24시간 후 자동으로 끊기는 문제로 인해 23시간 50분에 재연결 기능 추가
예외처리 시 연결 복구 기능 추가
📚 Changes
📝 Note
📌 Related Issue