Conversation
Walkthrough배치 작업의 트리거가 10분마다 실행되던 것에서 하루 한 번(04:00)에 실행되도록 변경되었습니다. 또한, Board ID를 읽어오는 Reader가 커서 방식에서 Iterator 방식으로 단순화되었으며, 관련 의존성도 build.gradle에 명시적으로 추가되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant QuartzScheduler
participant ClosingBoardBatchConfig
participant BoardService
participant IteratorItemReader
QuartzScheduler->>ClosingBoardBatchConfig: 트리거(매일 04:00)
ClosingBoardBatchConfig->>BoardService: findExpiredTimeAttackBoardIds(TIMEATTACK)
BoardService-->>ClosingBoardBatchConfig: 만료된 게시글 ID 리스트 반환
ClosingBoardBatchConfig->>IteratorItemReader: 리스트 래핑
IteratorItemReader-->>BatchJob: ID 순차 반환
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: spring batch 환경에서는 step 레벨에서 platformtransactionmanager를 통해 트랜잭션이 관리되므로, 개별 repository 메서드에 @Transac...Applied to files:
📚 Learning: boardrepositoryimpl.findboardlistdtobyuseridlist 메서드의 성능 최적화가 완료되었습니다. 서브쿼리 방식에서 left join + group b...Applied to files:
⏰ 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)
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
📌 관련 이슈
✨ 기능 요약
📝 상세 내역
📸 포스트맨 캡처 사진
🙋♀️ 리뷰어 참고사항
cursor 방식보다 iterator 방식이 수행 소요 시간이나 CPU 사용량 측면에서 성능이 향상됩니다.
https://www.notion.so/teamsparta/2242dc3ef51480e7a6b8e542527aa316
하루에 close로 상태 변경할 데이터 수가 1만 건 이상일 가능성이 미미하여 cursor 방식을 사용하는 것은 불필요하다고 판단하여 iterator 방식으로 수정하였습니다.
운영 환경에서 10분마다 배치가 돌아가는 것도 성능에 영향을 미치기 때문에 10분 간격으로 수행하던 걸 매일 새벽 4시(서비스 이용자가 가장 적을 거 같은 시간)에 한 번만 수행하도록 트리거를 수정했습니다.
Summary by CodeRabbit
새로운 기능
버그 수정
기타