Skip to content

[P7] findById tombstone 미필터 — 활성 조회 메서드 분리 #691

Description

@sevineleven

ROI · P7 · ★★★☆☆ — 임팩트 중간(조용한 버그 예방) / 노력 M(호출부 7곳)
findActiveById 분리로 탈퇴 유저가 살아나는 tombstone 누수 차단.


UserService.findById 가 soft-deleted(tombstone) 유저도 그대로 반환해, 활성 검증이 호출부 7곳에 제각각(throw / isActive / 미검증) 흩어져 있다. getMyProfile 은 tombstone 체크 없이 200 을 낸다. 새 경로가 deletedAt 체크를 빠뜨리면 탈퇴 유저가 살아나는 조용한 버그.

무엇을

  • 활성 유저 전용 조회(findActiveById)를 명시적으로 두고, tombstone 접근이 계약 위반인 경로를 그 메서드로 통일.
  • 전역 @SQLRestriction 은 탈퇴 cascade·findExisting(의도적 tombstone 읽기)과 충돌하므로 지양, 명시적 메서드 분리.
  • 위치: UserService.kt:242.

출처: 토너먼트·user 도메인 성능·안정성 전수조사

Metadata

Metadata

Assignees

Labels

refactor구조 개선, 외부 동작 불변

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions