[ai-assisted] fix(rag): 대용량 청크 저장 메모리 사용량 제한#519
Draft
donghyuck wants to merge 1 commit into
Draft
Conversation
Issue: 별도 Issue 없음 - PR #518 병합 후 발견된 대용량 청크 staging OOM 후속 조치 Why: log4jdbc가 대형 batch SQL 문자열을 조립할 때 JVM heap을 소진해 청킹이 중단되고 임베딩이 시작되지 않았다. What: staging과 ChunkSet JDBC 저장 batch 크기를 설정화하고 기본 25개 단위로 분할 저장하며 staging 교체를 transaction으로 묶었다. Validation: ./gradlew :starter:studio-platform-starter-ai:test --no-daemon (성공), git diff --check (성공)
5 tasks
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.
Why
대용량 Markdown 문서의 청크를 JDBC staging에 저장할 때
log4jdbc가 batch SQL과 파라미터를 하나의 문자열로 조립하면서 JVM heap을 소진했다. 이 때문에 청킹이OutOfMemoryError로 중단되고 임베딩 job은 시작되지 않았다.What
studio.ai.rag.indexing.chunk-write-batch-size설정을 추가했다.ChunkSet저장을 기본 25개, 최대 200개 단위로 분할했다.Related Issues
별도 Issue 없음. PR #518 병합 후 첨부 5 대용량 문서의 청킹 OOM을 분석하면서 발견한 후속 조치다.
Validation
./gradlew :starter:studio-platform-starter-ai:test --no-daemon성공git diff --check성공Risk / Rollback
작은 batch로 인해 DB round trip 횟수가 증가할 수 있다. 필요하면
studio.ai.rag.indexing.chunk-write-batch-size를 최대 200 범위에서 조정할 수 있으며, 문제가 발생하면 이 PR을 revert해 기존 200개 고정 batch 동작으로 복구할 수 있다.AI / Subagent Usage
AI-Assisted: Yes. Codex가 장애 분석, 구현, 테스트 작성 및 검증을 수행했다. 별도 subagent는 사용하지 않았다.
Checklist