fix: 릴리즈 리뷰 반영 (대화 목록 페이지·부가 정보를 단일 스냅샷으로) - #276
Conversation
릴리즈 PR #272 Codex P2 반영: myConversations의 페이지 조회·건수·부가 정보(마지막 메시지 미리보기·안읽음 수)가 독립 조회로 쪼개져 있어, 사이에 커밋된 메시지가 미리보기에만 반영되고 정렬 기준·커서(lastMessageAt)는 과거 값으로 남는 혼합 상태가 나갈 수 있었다. - getConversationPageWithExtras: 세 조회를 한 트랜잭션(단일 REPEATABLE READ 스냅샷)으로 통합, 부가 정보는 페이지 항목(limit)만 조회 - 기존 세 메서드는 tx 스코프 private으로 전환(외부 사용처 없음)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🩺 NestJS Doctor — 90/100 (Excellent)진단 303건 (error 0).
architecture / security 상위 항목
|
🧹 knip — dead-code 리포트전체 리포트
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b6d2eba37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| limit: number; | ||
| cursor?: { lastMessageAt: Date; id: bigint }; | ||
| }) { | ||
| return this.prisma.$transaction(async (tx) => { |
There was a problem hiding this comment.
Set the transaction isolation level explicitly
When the database or session uses READ COMMITTED, Prisma inherits that isolation level, so this transaction still gives each statement a fresh snapshot. A message committed after the page query can therefore appear in the later preview/unread queries while rows and its cursor retain the older last_message_at, preserving the mixed-state race this change is intended to eliminate. Pass isolationLevel: Prisma.TransactionIsolationLevel.RepeatableRead in the transaction options rather than relying on the server default.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
반영: isolationLevel RepeatableRead 명시 — 서버 기본값 의존 제거.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1868 tests passing in 225 suites. Report generated by 🧪jest coverage report action from 6db8b6f |
PR #276 Codex P2 반영: 단일 스냅샷 보장이 서버/세션 기본 격리 수준에 의존하지 않도록 REPEATABLE READ를 명시(READ COMMITTED 환경에서는 문장마다 새 스냅샷이라 혼합 상태 레이스가 재발).
릴리즈 PR #272 Codex P2 대응 — myConversations의 페이지·건수·부가 정보 조회를 한 트랜잭션(단일 스냅샷)으로 통합해, 조회 사이 커밋으로 미리보기와 정렬 기준/커서가 어긋나는 혼합 상태를 차단. API 표면 변경 없음.