[Feat] 인덱싱 Job Lease 갱신 및 만료 복구 - #91
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 (29)
📝 WalkthroughWalkthrough인덱싱 Job Lease 갱신 API와 만료 복구 흐름을 추가했다. Worker 상태를 DEAD로 fencing하고, 만료 Job을 잠금 경쟁으로 단일 복구한다. Retry와 최종 실패 전이를 공통 서비스로 통합했다. 관련 단위·통합·HTTP 테스트와 설계·검증 문서를 추가했다. ChangesLease lifecycle
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Scheduler
participant RecoveryQuery
participant RecoveryService
participant FailureTransition
Scheduler->>RecoveryQuery: 만료 PROCESSING Job ID 조회
RecoveryQuery-->>Scheduler: 후보 ID Snapshot
Scheduler->>RecoveryService: 후보별 복구 실행
RecoveryService->>FailureTransition: Retry 또는 최종 실패 전이
FailureTransition-->>RecoveryService: 전이 후 Job 상태
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 |
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.
배경
Worker가 Claim 이후 비정상 종료하거나 Lease가 만료되면 Embedding Job과 Attempt가 실행 상태에 남을
수 있습니다. 정상 Worker가 Lease를 갱신할 수 있게 하고, 만료된 Job은 여러 서버가 동시에 복구하더라도
한 번만 상태 전이하도록 복구 흐름이 필요했습니다.
변경 사항
FOR UPDATE SKIP LOCKED를 사용해 완료·실패·갱신·복구 경쟁을 직렬화했습니다.주요 동작
locked_at과 Claim Token은 유지합니다.PENDING으로 복귀합니다.검증
./gradlew clean build: 547개 테스트 통과, 실패·오류·Skip 0개EmbeddingJobLeaseRecoveryIntegrationTest: 동시성 테스트 4개 통과문서
docs/design/Gimini-3-#90-indexing-job-lease-recovery.mddocs/test-results/Gimini-3-#90-indexing-job-lease-recovery.mdCloses #90
Summary by CodeRabbit
새 기능
문서 및 테스트