Skip to content

[Refactor] 프로필 목록 조회 트랜잭션 경계 축소 - #988

Open
tnals0924 wants to merge 1 commit into
developfrom
refactor/#985-tx-boundary
Open

[Refactor] 프로필 목록 조회 트랜잭션 경계 축소#988
tnals0924 wants to merge 1 commit into
developfrom
refactor/#985-tx-boundary

Conversation

@tnals0924

@tnals0924 tnals0924 commented Sep 7, 2026

Copy link
Copy Markdown
Member

🐬 요약

멤버 프로필 목록 조회(GET /api/v1/members/profile)에서 DB 커넥션을 오래 점유하던 트랜잭션 경계를 축소하고, 정렬·조회 과정의 N+1을 제거했습니다.

👻 유형

  • 버그 수정
  • 기능 개발
  • 코드 스타일 수정 (formatting, local variables)
  • 리팩토링 (no functional changes, no api changes)
  • 빌드 관련 변경사항
  • CI 관련 변경사항
  • CD 관련 변경사항
  • 문서 내용 변경
  • Release
  • 기타...

🍀 작업 내용

  • DB 접근을 MemberProfileListRetriever의 짧은 readOnly 트랜잭션으로 분리하고, 서비스에서 @Transactional을 제거해 플랫폼 서버 HTTP 왕복·전원 정렬(약 1,300건) 동안 DB 커넥션을 점유하지 않도록 개선
  • 페이지 대상(기본 30건)의 엔티티·질문 미리보기·커피챗 활성 여부를 MemberProfilePageDataVo로 한 트랜잭션 안에서 모아 로드
  • 정렬 재료를 Projection으로 조회하고 커피챗 활성 여부를 벌크 조회로 전환해 N+1 제거
  • 프로필 목록 정렬·조회 단위 테스트 추가

🌟 관련 이슈

close: #985

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e3c7f55f-f948-4c06-a618-ef90e3a8355c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tnals0924 tnals0924 self-assigned this Sep 7, 2026
@tnals0924 tnals0924 added the ♻️ Refactor 코드 리펙토링 시 사용합니다. label Sep 7, 2026
@tnals0924 tnals0924 changed the title refactor: 프로필 목록 조회 트랜잭션 경계 축소 및 N+1 제거 [Refactor] 프로필 목록 조회 트랜잭션 경계 축소 및 N+1 제거 Sep 7, 2026
- DB 접근을 MemberProfileListRetriever의 짧은 readOnly 트랜잭션으로 이관
- 페이지 대상 매핑 자료를 MemberProfilePageDataVo로 한 번에 로드
- 서비스에서 @transactional 제거해 플랫폼 HTTP 왕복·전원 정렬 동안 커넥션 미점유
@tnals0924
tnals0924 force-pushed the refactor/#985-tx-boundary branch from a22bdf6 to 3012e3e Compare September 7, 2026 02:30
@tnals0924
tnals0924 changed the base branch from develop to refactor/#984-member-profile-projection September 7, 2026 02:32
@tnals0924 tnals0924 changed the title [Refactor] 프로필 목록 조회 트랜잭션 경계 축소 및 N+1 제거 [Refactor] 프로필 목록 조회 트랜잭션 경계 축소 Sep 9, 2026
@tnals0924
tnals0924 requested review from jyvnee and yxinot September 9, 2026 08:05
@tnals0924
tnals0924 marked this pull request as ready for review September 9, 2026 08:05
@tnals0924
tnals0924 changed the base branch from refactor/#984-member-profile-projection to develop September 9, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ Refactor 코드 리펙토링 시 사용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 회원 목록 조회 트랜잭션 경계 분리

1 participant