feat(word): harden distributed single-flight with redisson and redis client unification#328
Merged
Merged
Conversation
- introduce Redis lock + result key + Pub/Sub coordinator - apply dedup to word lookup/create flows - keep admin force reanalyze as fresh AI call - add configurable single-flight properties
- verify concurrent dedup and leader failure propagation - verify real redis cross-coordinator dedup behavior
- add dedicated timeout exception for single-flight wait - map timeout to WORD_ANALYSIS_TIMEOUT without invalid cache write - add regression test for timeout handling
…lures - map leader replay failures to temporary analysis timeout - skip invalid-word cache increment for replayed transient failures - normalize dedup key casing with Locale.ROOT
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04dafa282d
ℹ️ 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".
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.
Summary
word 동적 AI 생성 경로의 single-flight 중복 완화 구조를 추가/안정화하고, Redis 락 및 Redis 클라이언트 경로를 Redisson 중심으로 정리했습니다.
Problem
Solution
Changes
WordSingleFlightRedisCoordinator,WordSingleFlightProperties, timeout/failure 예외 추가WordService에 single-flight 실행 및 예외 매핑 반영RedisConfig에RedissonClient추가,JedisConnectionFactory기반으로 정리Bucket4jConfig를 Redisson CAS 기반 proxy manager로 전환build.gradle에서 Lettuce 의존 제거 및 Redisson/Jedis 의존 정리Example
(word, targetLanguage, promptVersion, model, schemaVersion)키 요청이 동시 유입되면Related Issues