Skip to content

fix: OPEN API WebClient으로 인한 Thread Starvation 문제를 해결한다#44

Merged
dev-ant merged 18 commits intodevfrom
fix/webclient-thread-abusing
Aug 25, 2025
Merged

fix: OPEN API WebClient으로 인한 Thread Starvation 문제를 해결한다#44
dev-ant merged 18 commits intodevfrom
fix/webclient-thread-abusing

Conversation

@dev-ant
Copy link
Contributor

@dev-ant dev-ant commented Aug 25, 2025

📋 상세 설명

  • WebClient로 인한 thread starvation 문제를 해결하기 위해 OpenAPI 경매 내역 처리 로직을 리팩터링했습니다.
  • AuctionHistoryClient는 블로킹 호출을 제거하고 Mono를 반환하도록 변경되었습니다.
  • 기존의 OPEN API fetch 로직 변경했습니다.
    • Scheduler는 데이터를 먼저 모두 가져온 후 배치 저장하도록 구조가 바뀌어 DB 트랜잭션 부담을 줄였습니다.

📊 체크리스트

  • PR 제목이 형식에 맞나요 e.g. feat: PR을 등록한다
  • 코드가 테스트 되었나요
  • 문서는 업데이트 되었나요
  • 불필요한 코드를 제거했나요
  • 이슈와 라벨이 등록되었나요

📆 마감일

Close #42

@dev-ant dev-ant requested a review from Copilot August 25, 2025 14:31
@dev-ant dev-ant self-assigned this Aug 25, 2025
@dev-ant dev-ant added the 🔧fix 버그 해결 label Aug 25, 2025
@github-actions
Copy link

github-actions bot commented Aug 25, 2025

✅ 테스트 결과 for PR

Build: success

🧪 테스트 실행 with Gradle
📈 Coverage: -0.00%

📁 테스트 결과
📁 커버리지 보고서 (HTML)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a thread starvation issue caused by the WebClient implementation in the OpenAPI auction history fetcher by restructuring the data fetching and persistence logic.

  • Refactored the AuctionHistoryClient to return reactive Mono objects instead of blocking synchronously
  • Restructured the scheduler to fetch all data first, then batch save to reduce database transactions
  • Temporarily commented out test files for auction history fetcher and service components

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
AuctionHistoryClient.java Changed to return Mono and removed blocking calls
AuctionHistoryScheduler.java Restructured to collect all entities before batch saving and removed inter-request delays
AuctionHistoryFetcher.java Updated to work with reactive client and improved logging
AuctionHistoryPersister.java Changed from saving directly to filtering and returning entities
AuctionHistoryService.java Simplified to handle batch saving of entities
Various test files Commented out test methods to disable them temporarily

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Aug 25, 2025

@dev-ant dev-ant merged commit ff650da into dev Aug 25, 2025
1 of 2 checks passed
@dev-ant dev-ant deleted the fix/webclient-thread-abusing branch August 25, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧fix 버그 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPEN API WebClient으로 인한 Thread Starvation 문제를 해결한다.

1 participant