Skip to content

fix(word): patch single-flight lock expiry and follower error semantics#330

Merged
SolfE merged 4 commits into
developfrom
fix-word-singleflight-hotfix-on-develop
May 20, 2026
Merged

fix(word): patch single-flight lock expiry and follower error semantics#330
SolfE merged 4 commits into
developfrom
fix-word-singleflight-hotfix-on-develop

Conversation

@SolfE
Copy link
Copy Markdown
Member

@SolfE SolfE commented May 20, 2026

Summary

develop 최신 기준으로 single-flight 관련 긴급 버그 픽스 3개 커밋만 이관한 PR입니다.

Problem

  • leader lock이 고정 lease 만료로 중간 해제될 수 있음
  • follower가 leader 도메인 실패를 timeout으로만 매핑해 의미가 손실됨
  • coordinator 내부 타입 오타로 컴파일 실패 가능성

Solution

  • Redisson watchdog 기반 lock 획득으로 전환
  • leader failure의 도메인 error code를 follower로 전달/복원
  • 타입 오타 수정

Changes

  • WordSingleFlightRedisCoordinator: watchdog lock + failure envelope(errorCode) 처리
  • WordSingleFlightLeaderFailureException: leader error code 필드 추가
  • WordsException: error code 노출
  • WordService: leader failure 도메인 매핑 보존
  • 관련 테스트 보강/수정 (WordServiceTest, WordSingleFlightRedisCoordinatorTest)

Example

  • leader가 WORD_IS_MEANINGLESS로 실패하면 follower도 동일하게 WORD_IS_MEANINGLESS를 반환

Related Issues

  • single-flight 리뷰 코멘트 P1/P2 대응

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a118ccf50f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/java/com/linglevel/api/word/service/WordService.java
@SolfE SolfE merged commit 5a32ace into develop May 20, 2026
1 check passed
@SolfE SolfE deleted the fix-word-singleflight-hotfix-on-develop branch May 20, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant