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

[WHD-255] Feat: Club Group API #59

Merged
merged 13 commits into from
Dec 2, 2024
Merged

Conversation

jjunhub
Copy link
Member

@jjunhub jjunhub commented Nov 29, 2024

기능 설명

  1. Group 추가, 수정, 삭제, 조회 기능
  2. Redis 분산락을 통한 동시성 이슈 해결

작성 상세 내용

  • Group CRUD API 추가
  • Redis 분산락 적용
    • 그룹별로 고유한 Redis 락을 생성하여 동시에 다수의 쓰레드가 접근하는 상황 방지
    • 기존 @transactional self-invocation 문제를 별도 서비스로 분리하여 해결
    • Jmeter를 통한 동시성 제어 테스트를 통해 예상된 그룹 멤버 수가 정확히 유지되는지 확인

관련 지라 티켓 번호

WHD-255

참고 자료

0.05초동안 10개의 쓰레드가 7명 정원인 그룹 참여 시도 테스트 결과
테스트

@juy4844
Copy link
Contributor

juy4844 commented Nov 29, 2024

프론트 분들을 배려해서 미리 올려두셨군요 확인하였습니다.

@jjunhub jjunhub force-pushed the WHD-255_feat-club_group_api branch from 3b8594e to b5b2f0c Compare November 30, 2024 14:00
@team8901 team8901 deleted a comment from github-actions bot Nov 30, 2024
@team8901 team8901 deleted a comment from github-actions bot Nov 30, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 1, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 1, 2024
- 그룹별로 고유한 Redis 락을 생성하여 동시에 다수의 쓰레드가 접근하는 상황 방지
- 기존 @transactional self-invocation 문제를 별도 서비스로 분리하여 해결
- 동시성 제어 테스트를 통해 예상된 그룹 멤버 수가 정확히 유지되는지 확인
@team8901 team8901 deleted a comment from github-actions bot Dec 1, 2024
@jjunhub jjunhub changed the title [WHD-255] Feat: Create Swagger docs for Group [WHD-255] Feat: Club Group API Dec 1, 2024
@jjunhub jjunhub force-pushed the WHD-255_feat-club_group_api branch 3 times, most recently from 527ff78 to f55e4a7 Compare December 2, 2024 04:22
@jjunhub jjunhub force-pushed the WHD-255_feat-club_group_api branch from f55e4a7 to d9c0268 Compare December 2, 2024 04:57
@team8901 team8901 deleted a comment from github-actions bot Dec 2, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 2, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 2, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 2, 2024
@team8901 team8901 deleted a comment from github-actions bot Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Test Coverage Report

Overall Project 70.62% -0.68% 🍏
Files changed 90.52% 🍏

File Coverage
GroupServiceTrans.java 100% 🍏
GroupMember.java 100% 🍏
Group.java 97.35% -2.65% 🍏
GroupRepositoryImpl.java 91.38% 🍏
GroupService.java 86.7% -13.3% 🍏
ClubService.java 83.73% -0.79% 🍏
GroupMemberRepositoryImpl.java 70.59% -29.41% 🍏

import org.springframework.test.context.junit.jupiter.SpringExtension;
import woohakdong.server.WoohakdongServerApplication;

@Target(ElementType.TYPE)
Copy link
Contributor

Choose a reason for hiding this comment

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

redis 테스트 정말 수고 많으셨습니다.!!

group.changeAvailability();
}

public void joinGroup(Long groupId, LocalDate date) {
Copy link
Contributor

Choose a reason for hiding this comment

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

redis로 lock쓰는거 처음 봅니다. 최고에요 @transaction 안붙이는 디테일 너무 훌륭합니다.

@jjunhub jjunhub merged commit ecb8e7f into develop Dec 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants