refactor: 주문 처리 소규모 구조 정리#106
Conversation
- MatchingEngine orderbook 조회/생성 helper 추출 - 반복 computeIfAbsent 제거 - MarketOrderLockService cancel 경로용 lock scope 추가 - OrderCancelService 직접 ReentrantLock 사용 제거 - cancel 경로 lock wait/hold 계측 기준 통일 - 검증: ./gradlew test
|
Warning Review limit reached
More reviews will be available in 37 minutes and 49 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 |
목적
배경
MatchingEngine내부 orderbook 조회/생성 코드 반복 존재MarketOrderLockScope기준 사용ReentrantLock직접 획득/해제 방식 사용변경 사항
MatchingEngine.getOrCreateBook()helper 추가planMatch,planMatchRejectingSelfTrade,applyMatchPlan,addToBook의 반복computeIfAbsent제거MarketOrderLockService.acquire(Long marketId, String marketSymbol, OrderSide side)추가OrderCancelService의 직접ReentrantLock사용 제거MarketOrderLockScope기준으로 통일검증
./gradlew test후속 작업
closes #105