[Hotfix] ConvictionScore, FearIndex 결과 없을 때 에러 대신 기본값으로 변경#225
[Hotfix] ConvictionScore, FearIndex 결과 없을 때 에러 대신 기본값으로 변경#225
Conversation
|
No actionable comments were generated in the recent review. 🎉 Walkthrough두 서비스의 조회 로직이 데이터 부재 시 예외를 던지던 방식에서 기본 응답 객체를 반환하는 방식으로 변경되었습니다. 또한 Changes
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/java/com/umc/finly/domain/analysis/association/service/ConvictionScoreServiceImpl.java (1)
30-43:@Transactional(readOnly = true)누락으로 인한 일관성 문제
FearIndexServiceImpl은 클래스 레벨에@Transactional(readOnly = true)가 선언되어 있어 읽기 전용 쿼리에 대한 DB 최적화 힌트를 제공합니다. 반면ConvictionScoreServiceImpl에는 클래스 레벨 트랜잭션 어노테이션이 없고,getConvictionScore메서드에도 별도 어노테이션이 없어 일관성이 부족합니다.♻️ 클래스 레벨에 readOnly 트랜잭션 추가 제안
`@Service` `@RequiredArgsConstructor` +@Transactional(readOnly = true) public class ConvictionScoreServiceImpl implements ConvictionScoreService {
🔗 관련 이슈
closes #
📌 작업 내용
기존에는 하락장공포지수, 매수확신도 DB에 저장된 산출 결과값이 없을 경우 에러를 발생시켰지만, 두 지수 모두 산출에 일정 기간이 소요되므로 에러 대신 기본값 내려주는 것으로 변경하였습니다.
🧪 테스트 결과
📸 스크린샷 (선택)
📎 참고 사항 (선택)
Summary by CodeRabbit
릴리스 노트