Repository navigation
refactor: DB만 다루는 서비스의 트랜잭션 선언을 클래스 기본값 + 쓰기 덮어쓰기로 맞춘다 - #162
Merged
Merged
Conversation
…o chore/merge-train
…nto chore/merge-train
… chore/merge-train
…o chore/merge-train
…to chore/merge-train
…chore/merge-train
…to chore/merge-train
…into chore/merge-train # Conflicts: # src/main/java/com/bcsdlab/bcsdinternalapiv2/curriculum/service/AdminCurriculumService.java
…o chore/merge-train
외부 호출이 없고 모든 public 메서드가 이미 @transactional을 선언하던 서비스 7개를 클래스 @transactional(readOnly = true) + 쓰기 메서드 @transactional로 바꾼다. 메서드별 실효 속성(읽기 전용/쓰기)은 그대로다. Slack·메일·HTTP 호출이 있거나 트랜잭션 밖에서 도는 메서드가 있는 서비스(AuthService, PasswordResetService, AdminMemberService, SlackProfileSyncService, MemberSlackIdWriter, Dues 알림 등)와 쓰기 전용 트랜잭션 경계 빈(*Writer, *Issuer 등)은 그대로 둔다.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
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 |
ff1451
marked this pull request as ready for review
October 18, 2026 13:39
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.
규칙
@Transactional(readOnly = true)를 두고, 쓰기 메서드에만@Transactional을 붙입니다.*Writer·*Issuer등)에 둡니다. 클래스에 선언하면 외부 응답을 기다리는 동안 DB 커넥션을 쥐고 있게 되기 때문입니다(#153과 같은 이유).바꾼 것 (7개)
ExemptionService,LedgerEntryService,SemesterService,RosterService,MemberService,MemberDirectoryService,ReservationService@Transactional을 명시하던 서비스만 골랐습니다.readOnly메서드 수와 쓰기 메서드 수가 원래와 같은지 셌습니다.그대로 둔 것
AuthService,PasswordResetService,AdminMemberService(@Async메일 리스너),SlackProfileSyncService,MemberSlackIdWriter,DuesNotification*,EvidenceLinkWriterImportReader·ImportWriter: 트랜잭션 없는 public 메서드가 있습니다.RefreshToken*,LoginSessionIssuer,LoginAttemptRecorder,DuesLinkService,DuesLinkWriter,DuesSemesterWriter(REQUIRES_NEW등 메서드별 속성이 있는 빈 포함)ServiceMemberService— 클래스로 옮겨도 얻는 게 없습니다.머지 순서
#148~#157 머지 후 main으로 rebase하고 ready로 바꿉니다. 이 PR의 변경은 마지막 커밋 하나입니다. #157이
ReservationService를 고치므로 그 뒤에 머지해야 합니다.검증