-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[TSK-52] refactor: CQRS 분리 및 osiv false 적용 #90
Merged
Merged
Conversation
This file contains 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
실패한 데이터 로그화 시켜두는건 좋은 거 같음 그러것들 모아서 백오피스단에서 질문-답변 정의로 처리할 수 있으니까! @Hoya324 |
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
✅ 작업 내용
1. OSIV 비활성화
false
로 설정하여 영속성 컨텍스트가 트랜잭션 범위 내에서만 유지되도록 변경했습니다.chore: OSIV 옵션 FALSE
(d7434f5)2. CQRS 패턴 도입
Create
,Update
,Find
와 같은 이름으로 분리하여 유지보수성을 높였습니다.refactor: QuestionService 분리
(2939f92, 83d09d6)test: QuestionService 분리
(51103b0)3. RAG 답변 트랜잭션 분리
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@Transactional(propagation = Propagation.REQUIRES_NEW)
refactor: RAG 답변 저장에 대한 transaction 전파범위 REQUIRES_NEW로 설정
(f19c875, efcb437)test: RAG 답변 저장에 대한 transaction 전파범위 REQUIRES_NEW로 설정
(d125509, 3985c88)refactor: RAG Answer 호출과 저장 분리
(a1fadf2)4. 로그 추가
chore: transaction logging
(f1ca940)test: transaction logging
(관련 테스트 포함)5. 폴더 구조 개선
refactor: 폴더 구조 개선
(36a517b)🤔 고민 했던 부분
1. RAG 서버 호출과 트랜잭션 분리
Propagation.NOT_SUPPORTED
를 적용하여 호출 시 트랜잭션을 일시 중단하고, 예외 처리 로직으로 데이터 정합성을 유지.2. 트랜잭션 전파 범위
REQUIRES_NEW
설정이 적합한지,NESTED
와 같은 다른 전파 범위가 적합할지 검토.REQUIRES_NEW
를 선택.3. CQRS 패턴 적용
4. DB커넥션 시간 단축
🔊 도움이 필요한 부분
1. RAG 호출 에러 처리 전략
2. CQRS 패턴 확장