Skip to content

Conversation

@Yujin1219
Copy link
Member

@Yujin1219 Yujin1219 commented Jan 5, 2026

#️⃣ 연관된 이슈

📝 작업 내용

  • 항공권 스케줄러 임시 비활성화

📌 공유 사항

✅ 체크리스트

  • Reviewer에 팀원들을 선택 했나요?
  • Assignees에 본인을 선택 했나요?
  • Merge 하려는 브랜치가 올바르게 설정되어 있나요?
  • 컨벤션을 지키고 있나요?
  • 로컬에서 실행했을 때 에러가 발생하지 않나요?
  • 불필요한 주석이 제거되었나요?
  • 코드 스타일이 일관적인가요?

스크린샷 (선택)

💬 리뷰 요구사항 (선택)

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요? or 변경 사항 등

Summary by CodeRabbit

릴리스 노트

  • 수정 사항
    • 항공편 스케줄러의 정기적 자동 실행 기능이 비활성화되었습니다. 항공편 데이터의 초기 로드 및 주기적 업데이트가 더 이상 자동으로 처리되지 않으며, 관련된 트랜잭션 처리 설정도 제거되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@Yujin1219 Yujin1219 self-assigned this Jan 5, 2026
@Yujin1219 Yujin1219 linked an issue Jan 5, 2026 that may be closed by this pull request
1 task
@Yujin1219 Yujin1219 merged commit 958fc90 into develop Jan 5, 2026
1 check passed
@Yujin1219 Yujin1219 deleted the chore/#27 branch January 5, 2026 05:57
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

워크스루

FlightScheduler.java 파일에서 updateFlights()와 initialLoadFlights() 메서드의 @Scheduled@Transactional 애노테이션이 주석 처리되었습니다. 메서드 서명은 유지되며 로직 변경은 없습니다.

변경 사항

Cohort / File(s) 변경 요약
스케줄링 애노테이션 주석 처리
src/main/java/com/example/triptalk/domain/tripPlan/scheduler/FlightScheduler.java
updateFlights()와 initialLoadFlights() 메서드의 @Scheduled@Transactional 애노테이션 주석 처리. 공개 메서드 서명은 유지되지만 예약된 실행 및 트랜잭션 경계 참여 제거

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 항공권 스케줄러 비활성화라는 실제 변경 내용을 명확하게 설명하고 있으며, 이슈 #27과도 연결되어 있습니다.
Description check ✅ Passed PR 설명은 필수 섹션들을 포함하고 있으며, 작업 내용이 명시되어 있으나 공유 사항이 빈 상태이고 체크리스트 항목들이 모두 미완료입니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In
@src/main/java/com/example/triptalk/domain/tripPlan/scheduler/FlightScheduler.java:
- Around line 110-111: The updateFlights() method in FlightScheduler currently
has @Scheduled commented out but @Transactional removed, which risks data loss
because deleteAll() runs before saveAll(); re-enable transactional boundary by
adding back the @Transactional annotation on the FlightScheduler.updateFlights()
method (or class) so that deleteAll() and saveAll() execute within a single
transaction, ensuring rollback on errors; keep @Scheduled commented if you want
the scheduler disabled but retain @Transactional to protect manual or
programmatic invocations.
🧹 Nitpick comments (1)
src/main/java/com/example/triptalk/domain/tripPlan/scheduler/FlightScheduler.java (1)

168-169: 트랜잭션 어노테이션 일관성 유지 권장

initialLoadFlights() 메서드도 @Transactional을 유지하는 것이 좋습니다. 현재는 updateFlights()를 호출하는 역할이지만, 향후 추가 작업이 필요할 경우를 대비하고 일관성을 유지하기 위해 스케줄링 어노테이션만 주석 처리하는 것을 권장합니다.

🔎 제안하는 수정 방안
     // @Scheduled(initialDelay = 10000, fixedDelay = Long.MAX_VALUE)
-    // @Transactional
+    @Transactional
     public void initialLoadFlights() {
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b292d21 and 44374ca.

📒 Files selected for processing (1)
  • src/main/java/com/example/triptalk/domain/tripPlan/scheduler/FlightScheduler.java

Comment on lines +110 to +111
// @Scheduled(cron = "0 0 3 * * MON")
// @Transactional
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

트랜잭션 경계 제거로 인한 데이터 무결성 위험

@Scheduled 어노테이션만 주석 처리하고 @Transactional은 유지해야 합니다. 현재 updateFlights() 메서드는 117번 라인에서 deleteAll()을 수행한 후 156번 라인에서 saveAll()을 수행합니다. 트랜잭션 없이 실행되면 saveAll() 중 오류 발생 시 데이터베이스가 비어있는 상태로 남게 되어 데이터 손실이 발생할 수 있습니다.

스케줄러를 비활성화하더라도 메서드가 수동으로 호출될 수 있으므로 트랜잭션 보호는 유지되어야 합니다.

🔎 제안하는 수정 방안
     // @Scheduled(cron = "0 0 3 * * MON")
-    // @Transactional
+    @Transactional
     public void updateFlights() {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// @Scheduled(cron = "0 0 3 * * MON")
// @Transactional
// @Scheduled(cron = "0 0 3 * * MON")
@Transactional
🤖 Prompt for AI Agents
In
@src/main/java/com/example/triptalk/domain/tripPlan/scheduler/FlightScheduler.java
around lines 110-111, The updateFlights() method in FlightScheduler currently
has @Scheduled commented out but @Transactional removed, which risks data loss
because deleteAll() runs before saveAll(); re-enable transactional boundary by
adding back the @Transactional annotation on the FlightScheduler.updateFlights()
method (or class) so that deleteAll() and saveAll() execute within a single
transaction, ensuring rollback on errors; keep @Scheduled commented if you want
the scheduler disabled but retain @Transactional to protect manual or
programmatic invocations.

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.

⚙️ Chore: 스케쥴러 코드 임시 중단

2 participants