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

서비스 계층에 데이터소스 라우팅 어노테이션 추가 #114

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

cire0304
Copy link
Collaborator

@cire0304 cire0304 commented Nov 6, 2023

완료 작업

서비스 계층에 데이터 소스 라우팅 어노테이션 추가

PR 요약

  1. 사용자 쿠폰 조회, 발급, 사용 요청은 모두 Primary DB를 보도록 설정하였습니다.
  2. 쿠폰 조회 요청은 Secondary DB를 보도록 설정하였습니다.

사용자 쿠폰 조회 요청을 Primary DB를 보도록 한 이유

사용자 쿠폰 조회 요청에서 사용자 쿠폰의 정보는 Primary DB에서 조회하도록 설정하였습니다.
그 이유는 Replication 복제 지연 이슈로, 사용자가 쿠폰을 발급하였지만, 조회되지 않는 이슈가 발생할 수 있다고 판단하여, 클라이언트의 응답 만족도를 높이기 위함입니다.

@cire0304 cire0304 added FEAT 기능 구현 EDIT 코드 수정 REVIEW-NEEDED labels Nov 6, 2023
@cire0304 cire0304 requested a review from f-lab-kane November 6, 2023 10:53
Copy link
Collaborator

@f-lab-kane f-lab-kane left a comment

Choose a reason for hiding this comment

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

@cire0304 님, 수고많으셨습니다.

라우팅 어노테이션에 따라 secondary db로 요청이 도달했는지 확인도 해보셨는지 궁금하네요.

@cire0304
Copy link
Collaborator Author

cire0304 commented Nov 6, 2023

@cire0304 님, 수고많으셨습니다.

라우팅 어노테이션에 따라 secondary db로 요청이 도달했는지 확인도 해보셨는지 궁금하네요.

네, 내부 코드 들어가서 어떤 데이터소스를 가져오는지 확인했습니다!

@cire0304 cire0304 closed this Nov 6, 2023
@cire0304 cire0304 reopened this Nov 6, 2023
# Conflicts:
#	src/main/java/com/ayucoupon/usercoupon/service/issue/IssueUserCouponService.java
@cire0304 cire0304 merged commit 61948cb into develop Nov 6, 2023
@cire0304 cire0304 deleted the feature/#113 branch November 6, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EDIT 코드 수정 FEAT 기능 구현 REVIEW-NEEDED
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants