Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor : 주문 승인 후 티켓 발급 과정에서 오류시 보상트랜잭션 실행 ( 민준이 추가작업 예정 ) #282

Merged
merged 8 commits into from
Feb 5, 2023

Conversation

ImNM
Copy link
Member

@ImNM ImNM commented Feb 2, 2023

개요

작업사항

  • 이슈 내용대로 옵션 수정으로 인한 주문 가격이 괴리가 벌어질 상황을 원천차단하기위해
  • 티켓발급이 먼저 락을 잡도록 유도하는 코드를 작성했습니다.
  • 주문 쪽에서 밸리데이션 시점이
  • 티켓발급이든 옵션 수정이든 티켓관리 락이 수행된 이후에 작업이되므로 논리적으로 안전해졌습니다.
  1. 티켓발급이 먼저수행 -> 옵션 수정 불가 상태
  2. 옵션 수정이 먼저수행 -> 티켓 발급 -> 주문에서 검증시 옵션이랑 괴리발생 -> 주문 도메인 실패 -> 발급된티켓 & 쿠폰 보상 트랜잭션 실행 순 입니다.

작업사항 - 민준

  • ConfirmOrderFailHandler에 티켓 취소 로직 추가해놓았습니다.
  • 기존 발급 티켓 도메인 서비스에 있던 티켓 취소 로직을 사용하려 했으나 찬진님의 조언 덕분에 티켓 쿼리 자체도 락으로 넣어서 새로운 로직을 작성했습니다.
  • 쿠폰 복구 로직 작성되면 머지하면 될 것 같습니다!
  • @gengminy @ImNM

작업사항 - 채린

  • 주문 실패 시 쿠폰 복구 로직 추가했습니다.
  • 이제 리뷰 시작하고 머지하면 될 것 같아용
    @gengminy @ImNM @sanbonai06

변경로직

  • 내용을 적어주세요.

@ImNM ImNM self-assigned this Feb 2, 2023
@gengminy
Copy link
Member

gengminy commented Feb 3, 2023

요 PR은 나중에 Approve 하면 되죠?

@ImNM
Copy link
Member Author

ImNM commented Feb 3, 2023

요 PR은 나중에 Approve 하면 되죠?

예압 민준이가 작업하고 노티줄거에요!

Copy link
Member

@sanbonai06 sanbonai06 left a comment

Choose a reason for hiding this comment

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

우리 모두 수고 많았습니다!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 304 Code Smells

16.9% 16.9% Coverage
0.0% 0.0% Duplication

Copy link
Member

@cofls6581 cofls6581 left a comment

Choose a reason for hiding this comment

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

수고하셨습니당

@cofls6581 cofls6581 merged commit f72a014 into dev Feb 5, 2023
@cofls6581 cofls6581 deleted the refactor/233-order-ticket-compensating-transaction branch February 5, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants