[Feat] Chunk Embedding 생성 및 Vector 저장 - #83
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 (25)
📝 WalkthroughWalkthrough문서 Chunk Embedding 생성 기능을 추가했다. Job 고정 모델과 Attempt 소유권을 검증하고, 외부 Vector를 순차 생성한다. Vector와 Chunk Snapshot을 재검증한 뒤 전체 Embedding을 원자 저장한다. 최초 생성, 재생, 실패, 동시 요청을 테스트한다. Changes문서 Embedding 생성 흐름
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Admin as 관리자 API
participant Service as DocumentEmbeddingService
participant Tx as DocumentEmbeddingTransactionService
participant Client as EmbeddingClient
participant DB as Embedding 저장소
Admin->>Service: Embedding 생성 요청
Service->>Tx: 준비 Transaction 실행
Tx-->>Service: Chunk Snapshot 반환
Service->>Client: Chunk별 /embed 호출
Client-->>Service: Vector 반환
Service->>Tx: 완료 Transaction과 Draft 전달
Tx->>DB: 전체 Embedding 원자 저장
DB-->>Tx: 저장 결과 반환
Tx-->>Service: 생성 또는 재생 결과 반환
Service-->>Admin: 201 또는 200 응답
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.
Summary
/embed호출을EmbeddingClient로 분리해 Query와 문서 Embedding 흐름이 같은 전송 경계를 사용하도록 했습니다.준비 Transaction → 외부 단건 순차 호출 → 완료 Transaction흐름을 구현했습니다.POST /admin/indexing-jobs/{jobId}/attempts/{attemptId}/embeddings를 추가했습니다.201 Created, 전체 결과 멱등 재생은200 OK를 반환합니다.Transaction / state contract
EmbeddingJob → DocumentVersion순서로 행을 잠급니다.STARTEDAttempt를 검증합니다.CHUNKED → EMBEDDING전이와EMBEDDING_STARTED이벤트를 기록합니다.EMBEDDING을 유지하며, Job·Attempt·Document 완료 처리는 후속 인덱싱 완료 기능에 남깁니다.Data contract
EmbeddingJob.embeddingModel의 ID와 Dimension을 사용합니다.(chunk_id, embedding_model_id)Unique 제약과 Version 행 잠금을 중복 저장의 최종 방어선으로 사용합니다.Verification
./gradlew clean build: 성공vector(1024)전체 Set 저장 및 재생Documentation
docs/design/Gimini-3-#82-chunk-embedding-vector-storage.mdCloses #82
Summary by CodeRabbit
새 기능
버그 수정
문서