[HIMIN-236] fix : finishDelivery 트랜잭션 분리 -> 결합 #120
Merged
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.
PR 확인 항목
PR 보내기전에 아래 항목들을 만족 하였는지 체크 해주세요
PR 종류
어떤 종류의 PR인지 아래 항목중에 체크 해주세요
어떤 기능이 추가 되었나요?
Issue Number: HIMIN-236
기존에 있던 기능에 영향을 주나요?
기타
기존에는 Delivery 도메인의 배달 종료 히스토리 저장 이후 트랜잭션을 분리하여 이벤트 처리로 Order에게 배달 완료를 전달했는데,
트랜잭션을 분리할 시 생길 수 있는 문제점이, Order의 배달종료 히스토리 저장에 실패할 경우 Order에는 배달 완료 히스토리가 저장이 되지 않지만,
Delivery 도메인의 배달 종료 히스토리 저장은 다른 트랜잭션이라, Delivery의 배달 종료는 정상 저장되어 데이터의 정합성이 깨지는 문제를 발견하여 Delivery의 배달종료 히스토리 저장 - Order의 배달완료 히스토리 저장을 같은 트랜잭션으로 묶어주었습니다.