Skip to content

fix: Bulk Insert를 위해 Auction History, Auction Item Option ID 생성 전략을 변경한다#47

Merged
dev-ant merged 8 commits intodevfrom
fix/remove-auction-history-id
Sep 10, 2025
Merged

fix: Bulk Insert를 위해 Auction History, Auction Item Option ID 생성 전략을 변경한다#47
dev-ant merged 8 commits intodevfrom
fix/remove-auction-history-id

Conversation

@dev-ant
Copy link
Contributor

@dev-ant dev-ant commented Sep 10, 2025

📋 상세 설명

  • ID 생성전략 (IDENTITY)의 문제로 Auction History insert시 bulk-insert가 아닌 row-by-row insert가 발생해서, 메모리를 많이 차지했다.
  • Bulk insert를 위해서 Auction History는 Open API 데이터에서 제공하는 auction_buy_id를 id처럼 사용하고, auction_item_options는 기존의 id drop 후 uuid pk를 추가해주었다.

📊 체크리스트

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

📆 마감일

Close #46

@dev-ant dev-ant requested a review from Copilot September 10, 2025 12:51
@dev-ant dev-ant self-assigned this Sep 10, 2025
@dev-ant dev-ant added the 🔧fix 버그 해결 label Sep 10, 2025
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 changes the ID generation strategy for Auction History and Auction Item Option entities to enable bulk insert operations and improve memory efficiency. The main changes include switching from IDENTITY to using auction_buy_id as the primary key for auction history, and replacing numeric IDs with UUID for item options.

  • Converts auction_history primary key from auto-generated IDENTITY to use auction_buy_id from Open API
  • Changes auction_item_option to use UUID-based primary key instead of IDENTITY
  • Implements proper bulk insert with batch processing for better performance

Reviewed Changes

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

Show a summary per file
File Description
V4__change_auction_history_pk.sql Database migration to change auction_history primary key to auction_buy_id
V5__change_item_option_pk.sql Database migration to replace item option ID with UUID primary key
V6__change_item_option_column_name.sql Renames item_option_id column to id for consistency
AuctionHistory.java Updates entity to use auction_buy_id as primary key
ItemOption.java Adds UUID generation and updates foreign key mapping
AuctionHistoryRepositoryPortImpl.java Implements proper bulk insert with batch processing
Various test files Updates test methods to use String IDs instead of Long
Various service files Import statement reorganization

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

@github-actions
Copy link

github-actions bot commented Sep 10, 2025

✅ 테스트 결과 for PR

Build: success

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

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

@codecov
Copy link

codecov bot commented Sep 10, 2025

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dev-ant dev-ant merged commit de6b24a into dev Sep 10, 2025
1 of 2 checks passed
@dev-ant dev-ant deleted the fix/remove-auction-history-id branch September 10, 2025 12:57
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.

Bulk Insert를 위해 Auction History, Auction Item Option ID 생성 전략을 변경한다

1 participant