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

[feat] : 내 Gallery 등록 기능 추가 #379

Merged
merged 5 commits into from
Feb 28, 2024
Merged

[feat] : 내 Gallery 등록 기능 추가 #379

merged 5 commits into from
Feb 28, 2024

Conversation

devxb
Copy link
Member

@devxb devxb commented Feb 26, 2024

어떤 기능을 개발했나요?

내 Gallery 등록 기능을 추가했습니다.

어떻게 해결했나요?

  • 조회 변수가 되는 gallery.target_id 칼럼에 unique index 추가
  • gallery에 낙관적 락 추가 및 bookmarked count 업데이트중 OptimisiticLockingFailure 뜨면 retry
  • 특정 survey를 북마크시, 북마크 카운트 증가하도록 구현
  • TargetDto가 자신이 북마크한 survey도 반환하도록 수정
  • 내 gallery 등록 e2e테스트 추가
  • GalleryService 통합 테스트 추가

이슈 넘버

참고자료

gallery/src/main/kotlin/me/nalab/gallery/domain/Gallery.kt Outdated Show resolved Hide resolved
Comment on lines 16 to 21
}.recoverCatching {
when(it is OptimisticLockingFailureException) {
true -> listenBookmarked(targetId)
false -> throw it
}
}
Copy link
Member

Choose a reason for hiding this comment

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

이건 횟수 제한 없어도 되나?

Copy link
Member Author

Choose a reason for hiding this comment

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

데이터 싱크 맞추려면 무조건 성공해야해서 횟수제한 안넣었어
jitter방식으로 몇초 대기하고 재실행하는 로직 넣어야할듯?

262fe5f

일단 비동기(클라이언트가계속대기할수도있으니까) + 랜덤대기로 구현하는방향으로 수정했어

Copy link

@devxb devxb requested a review from dojinyou February 26, 2024 23:57
@devxb devxb enabled auto-merge (squash) February 28, 2024 07:03
@devxb devxb disabled auto-merge February 28, 2024 07:04
@devxb devxb merged commit ee4accf into main Feb 28, 2024
4 checks passed
@devxb devxb deleted the devxb/iss-#361 branch February 28, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat]: 내 명함 Gallery에 등록 API 개발
2 participants