Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughWorker의 상태 전이를 ACTIVE/IDLE에서만 수행하도록 Entity와 조건부 Repository UPDATE를 강화했다. Service는 허용 상태 목록을 전달하며, 테스트와 설계 문서는 DEAD·STOPPED 상태 보존 및 반복 종료 검증을 반영한다. ChangesWorker 생명주기 상태 보호
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)정상 종료 조건부 갱신 흐름 sequenceDiagram
participant WorkerNodeCommandService
participant WorkerNodeRepository
participant Database
WorkerNodeCommandService->>WorkerNodeRepository: markStopped with LIVE_STATUSES
WorkerNodeRepository->>Database: Conditional UPDATE
Database-->>WorkerNodeRepository: Affected row count
WorkerNodeRepository-->>WorkerNodeCommandService: Success or failure
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 사항
ACTIVE,IDLE로 제한했습니다.WorkerNode.markStopped()와markDead()가 종착 상태인DEAD,STOPPED를 서로 덮어쓰지 않도록 방어했습니다.ACTIVE/IDLE → STOPPED/DEAD,DEAD → DEAD,STOPPED → STOPPED상태 전이 테스트를 추가했습니다.원인
기존 정상 종료 조건은
status <> STOPPED였습니다. 따라서 이미 비정상 종료로 확정된DEADWorker에 뒤늦은 종료 요청이 오면STOPPED로 변경되어 장애 상태가 정상 종료 상태로 덮어써질 수 있었습니다.영향
ACTIVE,IDLEWorker의 정상 종료는 기존처럼STOPPED와stopped_at을 기록합니다.DEADWorker의 종료 요청과STOPPEDWorker의 반복 종료는 갱신 행 수 0을 반환하며 기존 상태와 시각을 보존합니다.STOPPEDWorker를DEAD로 덮어쓰지 않습니다.검증
compileJava,compileTestJava통과WorkerNodeRepositoryTest는 테스트 코드 추가와 컴파일까지 확인했으나 로컬 PostgreSQL 연결 거부로 실행하지 못했습니다.Closes #50
Summary by CodeRabbit
버그 수정
DEAD또는STOPPED상태인 워커가 정상 종료 요청으로 덮어써지지 않습니다.테스트
문서