Skip to content

Refactor: AiChatMessageOrderEntity 내부 필드 변경#226

Merged
yooooonshine merged 1 commit intodevelopfrom
feature/222-refactor-messageorder
Oct 26, 2025
Merged

Refactor: AiChatMessageOrderEntity 내부 필드 변경#226
yooooonshine merged 1 commit intodevelopfrom
feature/222-refactor-messageorder

Conversation

@yooooonshine
Copy link
Contributor

@yooooonshine yooooonshine commented Oct 26, 2025

개요

작업사항

AiChatMessageOrderEntity 내부 필드 변경(userId, postId 대신 aiChatRoomId)

Summary by CodeRabbit

릴리스 노트

  • Refactor
    • AI 채팅방 메시지 순서 관리 시스템을 재구성하여 채팅 환경에서의 메시지 처리 안정성을 개선했습니다. 내부 데이터 구조를 최적화하여 시스템 성능을 향상시켰습니다.

@yooooonshine yooooonshine merged commit 70ec6e1 into develop Oct 26, 2025
1 check passed
@coderabbitai
Copy link

coderabbitai bot commented Oct 26, 2025

Caution

Review failed

The pull request is closed.

🔄 Walkthrough

메시지 순서 추적의 고유 제약 조건을 복합 키 (user_id, post_id)에서 단일 열 (ai_chat_room_id)로 리팩토링했습니다. 엔티티, 저장소, 서비스 및 리스너에서 관련 메서드 시그니처와 호출 지점을 일관되게 업데이트했습니다.

📋 Changes

연관 파일 / 변경 요약
엔티티 및 저장소 리팩토링
AiChatMessageOrderEntity.java, AiChatMessageOrderRepository.java
서비스 계층 업데이트
AiChatMessageOrderService.java, AiChatMessageService.java
리스너 및 서버 서비스
AiImageCreatedListener.java, AiServerService.java

🎯 Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • 주의할 점:
    • 데이터베이스 마이그레이션 스크립트 필요성 확인 (기존 user_id, post_id 열에서 ai_chat_room_id로의 전환)
    • 모든 호출 지점에서 매개변수 변경이 일관되게 적용되었는지 확인
    • 동시성 문제 해결(이슈 MessageOrder 원자성 보장 #222)의 효과성 검증

🔗 Possibly related PRs

🐰 Poem

🌙 채팅방마다 순서를 지키고
복잡한 쌍을 하나로 모아
동시성 문제도 춤을 추고 ✨
메시지들은 질서 정연하게 흐르네
한 마리 토끼는 웃네요 🐇

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/222-refactor-messageorder

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95b7cb5 and 02e0f3b.

📒 Files selected for processing (6)
  • src/main/java/hanium/modic/backend/domain/ai/aiChat/entity/AiChatMessageOrderEntity.java (1 hunks)
  • src/main/java/hanium/modic/backend/domain/ai/aiChat/repository/AiChatMessageOrderRepository.java (1 hunks)
  • src/main/java/hanium/modic/backend/domain/ai/aiChat/service/AiChatMessageOrderService.java (1 hunks)
  • src/main/java/hanium/modic/backend/domain/ai/aiChat/service/AiChatMessageService.java (1 hunks)
  • src/main/java/hanium/modic/backend/domain/ai/aiServer/listener/AiImageCreatedListener.java (2 hunks)
  • src/main/java/hanium/modic/backend/domain/ai/aiServer/service/AiServerService.java (1 hunks)

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.

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.

MessageOrder 원자성 보장

1 participant