Repository navigation
fix(pose): binlog_format=STATEMENT 면 기동 거부 — RC 저장 1665 장애를 배포 시점으로 (#276) - #845
Merged
Merged
Conversation
…장애를 배포 시점으로 (#276) #276 처방(RC)이 MySQL 8.0 기본값 ROW 에 기대고 있었는데 compose·my.cnf 어디에도 적혀 있지 않았다. STATEMENT 로 바뀌면 RC 트랜잭션의 쓰기가 1665 로 거부돼 pose 저장이 전부 실패한다. BinlogFormatStartupCheck 가 기동 때 log_bin=ON · 세션 binlog_format=STATEMENT 면 컨텍스트를 멈춘다 (ROW·MIXED·binlog 꺼짐은 통과, MySQL 이 아니면 건너뜀). compose 에 --binlog-format 을 적는 안은 8.0.34+ deprecated 경고 · compose 밖에선 무효라 택하지 않음(사용자 confirm). 같은 문서의 «findById 도 RC 가 된다 — 확인 안 함» 은 코드 대조로 닫음 — 트랜잭션 안 문장 넷 모두 보장 불변. 검증: 판정 단위 3/3 · H2 컨텍스트 통과(건너뜀 경로). 실 MySQL 테스트(정상 통과 + 전제 1665 재현)는 로컬 Docker 없이 건너뜀 → CI. 로컬 compose 로 기동 확인 — ROW 면 «binlog 형식 확인» 후 UP, SET GLOBAL binlog_format=STATEMENT 뒤 재기동하면 BeanCreationException 으로 멈춤(확인 뒤 ROW 로 복구). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 50 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. |
Member
Author
|
@coderabbitai review |
Action not completed
|
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.
무엇
BinlogFormatStartupCheck(새 빈): 기동 때log_bin=ON이고 세션binlog_format=STATEMENT면 기동을 거부한다. ROW·MIXED·binlog 꺼짐은 통과, MySQL 이 아니면(H2 테스트) 건너뛴다.docs/decisions/r276-lock-root-cause-fix.md§2 ㄴ 표의 «모르는 것» 두 줄을 닫았다.왜
#276 처방(RC)은 MySQL 8.0 기본값 ROW 에 기대고 있는데, compose·my.cnf 어디에도 적혀 있지 않다. STATEMENT 가 되면 RC 쓰기가 오류 1665 로 거부돼 pose 저장이 전부 실패한다. 데이터가 조용히 깨지는 건 아니지만, 장애가 운동 중인 사용자에게서 처음 드러난다. 이 검사는 그 시점을 배포 순간으로 당긴다.
compose 에
--binlog-format=ROW를 적는 안은 택하지 않았다. 8.0.34+ 에서 deprecated 경고가 나고, compose 밖(관리형 DB)에서는 효과가 없다.findById줄은 코드 대조로 닫았다. 트랜잭션 안 문장 넷(세션 조회·종목 지연 로딩·pose INSERT·last_active_atUPDATE) 모두 RR→RC 로 잃는 보장이 없다. 상세는 문서 표에 있다.검증
ShadowfitApplicationTests(H2, 건너뜀 경로) 통과BinlogFormatStartupCheckRaceTest(실 MySQL): 기본 ROW 통과 + 전제 재현(STATEMENT + RC 쓰기 = 1665). 로컬에 Docker 가 없어 건너뜀 → CI 에서 확인binlog 형식 확인 — log_bin=true binlog_format=ROW후 UP.SET GLOBAL binlog_format='STATEMENT'뒤 재기동 →BeanCreationException으로 기동 중단. 확인 뒤 ROW 로 복구🤖 Generated with Claude Code