Repository navigation
Conversation
Context 캐시에 남은 다른 시험 Context의 RagJobWorker가 공용 test 스키마를 polling하며 이 시험의 작업을 먼저 claim했다. 이 클래스만 TEST_DB_SCHEMA에 _rag_claim을 붙인 전용 스키마를 쓴다. Refs #520
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 was referenced Oct 16, 2026
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.
🔍️ 작업 내용
RagResponseClaimIntegrationTest가 CI에서 간헐적으로 실패하던 원인은 다른 시험 Context의 RAG Worker였습니다. 이 Worker가 공용 test 스키마를 polling하며 시험이 만든 작업을 먼저 가져갔습니다. 수정으로 이 시험 클래스만 전용 스키마를 쓰게 했고, 운영 코드는 바꾸지 않았습니다.경합 창을 넓힌 강제 조건에서 수정 전 20회 중 20회 실패, 수정 후 20회 모두 통과했습니다. 격리 DB의 전체 백엔드
clean build는 1,501건 중 실패·오류 0건이었습니다.✨ 상세 설명
@MockitoBean RagJobWorker로 자기 Context의 Worker만 막습니다([Fix] RAG 작업 claim에 lease와 소유권 토큰 적용 #515).RagJobWorker는 1초마다 같은 test 스키마의PROCESSING행을 같은 쿼리로 claim합니다.orElseThrow로 끝납니다. 그러면 latch가 내려가지 않아 138행이 10초 뒤 실패합니다.rag-worker-job-1스레드 두 개가 이 시험의 queryId 5·6을 처리했습니다.claim_allowsExactlyOneConcurrentOwner도 두 claim이 모두 빈 결과가 될 수 있습니다. 자연 반복 실행에서 한 번 재현했습니다.@DynamicPropertySource로TEST_DB_SCHEMA를<기존값>_rag_claim으로 바꿉니다(시험 파일 11줄 추가).application-test.yml의 접속 URL과 Flyway 설정이 모두 이 값을 따르므로 다른 설정은 손대지 않았습니다.RagJobWorker에 조건부 설정(운영 코드)이 필요합니다. 실제 Worker를 쓰는 시험 두 개도 따로 켜고 Context를 닫아야 합니다.🧪 실제 검증 결과
환경: 로컬 macOS arm64·OpenJDK 17.0.18, 새 격리 PostgreSQL 17.8·pgvector 0.8.1·Valkey 9.1 컨테이너(사용자 로컬 DB 미사용). Ollama는 CI처럼 띄우지 않았습니다. 기준은 develop
37b08a4(#519 병합 후)입니다.clean build, 251개 묶음, 1분 29초StompSessionLifecycleIntegrationTest의 JWT 만료 시험 1건이 실패했습니다. 수명 1초 JWT의exp가 초 단위로 잘려, 구독 확인보다 세션 종료가 먼저 올 수 있는 타이밍 문제로 보입니다. 새 컨테이너로 다시 돌린 full-build-02에서는 통과했습니다.🛠️ 추후 리팩토링 및 고도화 계획
PROCESSINGRAG 작업을 만들고 claim 순서를 단언하는 시험을 추가하면 같은 격리가 필요합니다.💬 리뷰 요구사항
<TEST_DB_SCHEMA>_rag_claim스키마가 DB에 남습니다(다음 실행에서 재사용). 이 방식이 괜찮은지 봐 주세요.