Skip to content

[#609] 서비스 레이어의 Firebase 작업을 트랜잭션화한다#642

Merged
opficdev merged 6 commits into
developfrom
refactor/#609-transaction
Jun 26, 2026
Merged

[#609] 서비스 레이어의 Firebase 작업을 트랜잭션화한다#642
opficdev merged 6 commits into
developfrom
refactor/#609-transaction

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • Firebase 서비스 레이어에서 여러 Firestore 문서를 순차적으로 읽고 쓰던 흐름을 transaction 기반으로 정리

📝 작업 내용

📌 요약

  • 사용자 upsert 시 여러 Firestore 문서 갱신을 하나의 transaction으로 처리
  • 알림 읽음 상태 토글의 read-modify-write 흐름을 transaction으로 처리
  • Apple refresh token 삭제 시 문서 확인과 필드 삭제를 transaction으로 처리
  • 커밋 메시지 확인 시 GitHub merge commit subject가 아닌 실제 개별 커밋 메시지를 확인하도록 workflow 지침 보강

🔍 상세

  • UserServiceImpl.upsertUser에서 users, info, tokens, settings, todoCounter 문서 갱신을 runTransaction 내부로 이동
  • PushNotificationServiceImpl.toggleNotificationRead에서 알림 문서의 isRead 값을 transaction 내부에서 다시 읽고 반전 업데이트하도록 변경
  • AppleAuthenticationServiceImpl.unlink에서 appleRefreshToken 삭제 전 문서 확인과 필드 삭제를 transaction 내부에서 처리
  • .hermes/skills/devlog-architecture-harness/references/devlog-workflow-rules.md에 merge commit body 또는 non-merge commit 기준으로 커밋 메시지 스타일을 확인하는 지침 추가

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 26, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

이번 PR은 Firestore 트랜잭션을 적용하여 데이터 일관성을 보장하고, 기존의 비동기 병렬 처리 방식을 트랜잭션 기반으로 리팩토링하는 변경사항을 포함하고 있습니다. 구체적으로는 알림 읽음 처리, 애플 리프레시 토큰 삭제, 할 일 추가 및 사용자 문서 업서트 로직에 트랜잭션을 도입하였습니다. 리뷰 의견으로는 PushNotificationServiceImpl 내 트랜잭션의 catch 블록에서 에러 설정 후 즉시 return nil을 수행하도록 하여, 향후 코드 수정 시 발생할 수 있는 잠재적인 버그를 방지하고 타 서비스와의 일관성을 유지할 것을 제안했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@opficdev opficdev merged commit a238b36 into develop Jun 26, 2026
6 checks passed
@opficdev opficdev deleted the refactor/#609-transaction branch June 26, 2026 00:58
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.

서비스 레이어의 Firebase 작업을 트랜잭션화한다

1 participant