Skip to content

hotfix: 키워드 알림 이력 저장 트랜잭션 분리#2189

Merged
taejinn merged 2 commits intomainfrom
hotfix/2187-keyword-transaction-fix
Mar 18, 2026
Merged

hotfix: 키워드 알림 이력 저장 트랜잭션 분리#2189
taejinn merged 2 commits intomainfrom
hotfix/2187-keyword-transaction-fix

Conversation

@taejinn
Copy link
Contributor

@taejinn taejinn commented Mar 18, 2026

🔍 개요

  • 키워드 알림 발송 후 이력 저장 과정에서 트랜잭션 종료 이후 DB write가 수행되며 no transaction is in progress 오류 발생하던 문제 수정함
  • user_notification_status native upsert에서 audit 컬럼 누락으로 insert 실패 가능하던 부분 함께 보완함

🚀 주요 변경 내용

  • 키워드 알림 이력 저장 로직을 별도 트랜잭션(REQUIRES_NEW)으로 분리함
  • user_notification_status upsert 쿼리에 created_at, updated_at 반영함
  • 관련 단위 테스트로 트랜잭션 전파 설정 검증함

💬 참고 사항

  • 실제 원인은 커밋 이후 실행되는 리스너에서 DB write를 수행한 트랜잭션 경계 문제였음
  • 추가로 native upsert가 audit 컬럼을 직접 채우지 않아 운영 환경에서 insert 실패 가능성 있었음
  • 검증용 acceptance 테스트는 제외하고 실제 수정 코드만 반영함

✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: e9bdbcbd-af02-49f1-ad4e-0ecbaaba2870

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/2187-keyword-transaction-fix
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

@github-actions github-actions bot added 공통 백엔드 공통으로 작업할 이슈입니다. 버그 정상적으로 동작하지 않는 문제상황입니다. labels Mar 18, 2026
@taejinn taejinn requested a review from DHkimgit March 18, 2026 08:02
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

Unit Test Results

691 tests  +1   688 ✔️ +1   1m 23s ⏱️ -2s
169 suites ±0       3 💤 ±0 
169 files   ±0       0 ±0 

Results for commit 9f3f04a. ± Comparison against base commit e41a0cf.

♻️ This comment has been updated with latest results.

@taejinn taejinn requested review from dh2906 and kih1015 March 18, 2026 08:07
@taejinn taejinn self-assigned this Mar 18, 2026
Copy link
Contributor

@dh2906 dh2906 left a comment

Choose a reason for hiding this comment

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

고생하셨습니당

@taejinn taejinn merged commit 8449412 into main Mar 18, 2026
12 checks passed
@taejinn taejinn deleted the hotfix/2187-keyword-transaction-fix branch March 18, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

공통 백엔드 공통으로 작업할 이슈입니다. 버그 정상적으로 동작하지 않는 문제상황입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants