Skip to content

[FIX] 이벤트 엇갈림으로 인한 데이터 누락 수정_(NEW: AuthUserProjection.workspace)#56

Merged
Lee-Jong-Jin merged 3 commits into
mainfrom
SPM-496
Nov 11, 2025
Merged

[FIX] 이벤트 엇갈림으로 인한 데이터 누락 수정_(NEW: AuthUserProjection.workspace)#56
Lee-Jong-Jin merged 3 commits into
mainfrom
SPM-496

Conversation

@Lee-Jong-Jin

@Lee-Jong-Jin Lee-Jong-Jin commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

📣 Related Issue

  • close # SPM-496

📝 Summary

일부 데이터가 시간 차로 인해 누락되는 문제 발견 및 방지 조치
(AuthUserProjection.workspace 데이터 하나 누락 발생, 원본 데이터 정상)

🙏 Question & PR point

📬 Reference

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 메시지 큐 소비자 그룹 구성 업데이트
    • 내부 데이터 처리 로직 개선

참고: 이 릴리스는 주로 내부 인프라 및 시스템 안정성 개선에 중점을 두고 있습니다. 최종 사용자에게 직접적인 기능 변화는 없습니다.

@coderabbitai

coderabbitai Bot commented Nov 11, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Lee-Jong-Jin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 915d9e5 and 487b711.

⛔ Files ignored due to path filters (1)
  • src/main/java/com/sampoom/user/common/exception/.DS_Store is excluded by !**/.DS_Store
📒 Files selected for processing (1)
  • src/main/java/com/sampoom/user/api/auth/service/AuthUserProjectionService.java (1 hunks)

개요

Kafka 컨슈머의 그룹 ID가 "vendor-events-users"에서 "vendor-events-user"로 변경되었고, AuthUserProjectionService의 upsert 메서드에서 null 안전성 관련 로직이 수정되어 잠재적 null 역참조 위험이 도입되었습니다.

변경 사항

응집 집합 / 파일 변경 요약
Kafka 리스너 설정
src/main/java/com/sampoom/user/api/agency/kafka/AgencyEventConsumer.java
KafkaListener의 groupId를 "vendor-events-users"에서 "vendor-events-user"로 변경. 기능은 동일하나 컨슈머 그룹 할당 및 오프셋 추적에 영향
인증 사용자 프로젝션 업서트 로직
src/main/java/com/sampoom/user/api/auth/service/AuthUserProjectionService.java
upsert 메서드에서 새로운 AuthUserProjection 생성 시 email과 role 필드에 null을 참조하는 조건부 폴백 추가. 기존 프로젝션 업데이트 경로에서 workspace 필드에 null 안전성 폴백 적용. 잠재적 null 역참조 위험 도입

예상 코드 리뷰 노력

🎯 3 (중간) | ⏱️ ~20분

추가 검토 필요 영역:

  • AuthUserProjectionService.java의 upsert 메서드에서 새로운 프로젝션 경로에 null 역참조 위험 - existing이 null일 때 existing 객체를 참조하는 로직 검증 필요
  • Kafka groupId 변경이 기존 오프셋 및 컨슈머 그룹 멤버십에 미치는 영향 검토

관련 가능성 있는 PR

  • PR #39: AgencyEventConsumer의 Kafka 리스너 groupId를 동일하게 "vendor-events-user"로 변경하는 동일한 코드 레벨 변경 포함
  • PR #45: AgencyEventConsumer.consume의 KafkaListener groupId 파라미터를 동일하게 수정하는 변경 포함
  • PR #48: AuthUserProjectionService를 수정하며 warmup 경로에서 빌더 할당을 재정렬하는 변경 포함

제안 검수자

  • Sangyoon98
  • CHOOSLA
  • vivivim
  • yangjiseonn
  • taemin3

🐰 Kafka의 이름 바꿈이 왔네요,
vendor-events 숲속의 변화,
upsert 길에 null의 그림자 살금살금,
안전성 검사가 필요한 시간,
그룹 ID는 바뀌었어도 메시지는 흐르네! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경 사항을 명확하게 설명하고 있습니다. 이벤트 엇갈림으로 인한 데이터 누락 수정 및 AuthUserProjection.workspace 추가라는 핵심 내용을 포함하고 있습니다.
Description check ✅ Passed PR 설명이 필수 템플릿 구조(Related Issue, Summary, Question & PR point, Reference)를 따르고 있습니다. 다만 Question & PR point와 Reference 섹션이 비어있습니다.

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fafa62c and 915d9e5.

📒 Files selected for processing (2)
  • src/main/java/com/sampoom/user/api/agency/kafka/AgencyEventConsumer.java (1 hunks)
  • src/main/java/com/sampoom/user/api/auth/service/AuthUserProjectionService.java (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-06T07:37:44.411Z
Learnt from: Lee-Jong-Jin
Repo: 33-Auto/Sampoom-Management-Backend-User PR: 41
File: src/main/java/com/sampoom/user/api/agency/service/AgencyProjectionService.java:26-26
Timestamp: 2025-11-06T07:37:44.411Z
Learning: In the Sampoom-Management-Backend-User project, the team is performing an incremental refactoring from "agency" to "vendor" terminology. Field names and method calls are being updated first (e.g., AgencyId -> VendorId), while local variable names will be updated in a follow-up change. Do not suggest renaming local variables during this transition period.

Applied to files:

  • src/main/java/com/sampoom/user/api/agency/kafka/AgencyEventConsumer.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (java-kotlin)

Comment thread src/main/java/com/sampoom/user/api/auth/service/AuthUserProjectionService.java Outdated

@vivivim vivivim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

좋습니다

@Lee-Jong-Jin Lee-Jong-Jin merged commit 2061499 into main Nov 11, 2025
6 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