Repository navigation
feat(auction): 입찰 잠금 전 최소 금액 확인 - #248
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
AU-4 부하 테스트에서 8,000건 중 99.9%가
BID_AMOUNT_TOO_LOW였지만, 모든 요청이 경매 행 잠금을 기다린 뒤 거절됐습니다. 확실히 금액이 부족한 입찰은 잠금 전에 거절해 잠금 대기를 줄입니다.BidPrecheckService추가BidService.place()전에 사전 확인아래를 모두 만족할 때만 미리 거절합니다.
OPEN이고startsAt <= 지금 < endsAtIdempotency-Key로 수락된 입찰이 없음그 외에는 기존 잠금 경로에서 처음부터 판단합니다.
OPEN경매의 최소 금액과 종료 시각은 줄지 않으므로, 조금 오래된 캐시로도 수락 가능한 입찰을 잘못 거절하지 않습니다.Affected domain and invariants
경매 입찰 진입 경로를 변경했습니다.
BidService의 잠금, 크레딧 처리, 트랜잭션은 바꾸지 않았고 수락되는 입찰은 기존처럼 경매 행 잠금 안에서 최종 검증합니다. 동시 입찰 테스트에서 경매 불변식을 확인했습니다.Tests
BidPrecheckTest: 15개 중 5개 실패 확인bash tools/harness/harness-check.sh: PASS, 테스트 120개 통과FULL=1 bash tools/harness/harness-check.sh: PASS, 테스트 906개 통과BidPrecheckTest가 검출: 요청 키 확인 누락과 순서 오류, 판매자·최고 입찰자 확인 누락, 시작·종료 조건 누락, 금액 경계 오류, 조회 실패 처리와 지표 누락, 세대 번호 무시부하 테스트 재측정(AU-4, AU-1)은 머지 뒤 진행합니다.
Contract / documentation updates
docs/contracts/api/auction.md:BID_AMOUNT_TOO_LOW의minimumBidAmount가 최대 1초 전 값일 수 있음을 추가했습니다.docs/domains/auction/transactions.md: 잠금 전 금액 확인을 추가했습니다.Remaining risks
Closes #242