[Feat] Worker 등록 및 Heartbeat 구현 - #40
Merged
Merged
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 (24)
📝 WalkthroughWalkthroughWorker 인스턴스 식별자와 상태 제약, 등록·Heartbeat·종료 생명주기, 만료 상태 계산, 관리자 조회 API 및 관련 테스트가 추가되었습니다. ChangesWorker heartbeat feature
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Application
participant WorkerLifecycleManager
participant WorkerNodeCommandService
participant WorkerNodeRepository
Application->>WorkerLifecycleManager: ApplicationReadyEvent
WorkerLifecycleManager->>WorkerNodeCommandService: register(instanceId, host information)
WorkerNodeCommandService->>WorkerNodeRepository: save ACTIVE worker
Application->>WorkerLifecycleManager: ContextClosedEvent
WorkerLifecycleManager->>WorkerNodeCommandService: stop(workerId, instanceId)
WorkerNodeCommandService->>WorkerNodeRepository: markStopped STOPPED worker
Possibly related PRs
Suggested labels: ✨ 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 |
Gimini-3
marked this pull request as ready for review
July 20, 2026 16:54
This was referenced Jul 22, 2026
Merged
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.
작업 내용
STOPPED상태를 기록합니다.instance_id를 추가해 동일한 역할명의 여러 Worker 실행 인스턴스를 구분합니다.DEAD상태를 계산합니다.GET /admin/workers조회 API를 추가합니다.설계 배경
Heartbeat와 종료 처리가 경쟁할 때 오래된 엔티티 저장으로
STOPPED상태가 되돌아가지 않도록, Heartbeat는ACTIVE또는IDLE행의 시간 컬럼만 갱신하는 조건부 UPDATE를 사용합니다. Worker 기능은 기본적으로 비활성화하고 Worker 역할의 배포에서만 명시적으로 활성화합니다.영향
V31__add_worker_instance_id.sqlindexing.worker.enabled,name,heartbeat-interval,dead-thresholdGET /admin/workers검증
./gradlew clean buildgit diff --checkCloses #39
Summary by CodeRabbit
새로운 기능
버그 수정
문서