Repository navigation
fix(event): 본문이 길면 문서 저장이 500 — event_publication.serialized_event 컬럼 확장 (#47) - #50
Merged
Merged
Conversation
jyx-07
approved these changes
Nov 12, 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.
Refs #47
원인 (추정)
Spring Modulith의
event_publication.serialized_event는 엔티티에 길이 지정이 없어ddl-auto가 VARCHAR(255)로 만든다.ArticleUpdatedEvent는 본문을 통째로 담아 JSON으로 이 컬럼에 저장되는데, 본문 외 필드가 약 200자를 차지해 제목+본문이 50자 안팎을 넘으면 "Data too long"으로 문서 저장 트랜잭션 전체가 롤백된다.#47의 재현 표도 실패한 쪽은 모두 본문이 길고 성공한 쪽은 짧아서, 같은 원인일 가능성이 높다(링크·로그인 여부는 우연으로 보인다).
서버 로그로 확정한 것은 아니다. stage 로그에
Data too long for column 'serialized_event'가 있으면 확정된다.변경
EventPublicationSchemaFix: 기동할 때마다ALTER TABLE event_publication MODIFY serialized_event LONGTEXT NOT NULL실행ddl-auto: update는 기존 컬럼을 넓히지 않아서 이 방식을 택했다.테스트
./mill __.test통과