Conversation
Feat(policy): repeatBlock redis 적재 방식 변경(2일 걸쳐있는 경우)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis PR introduces an admin-only endpoint to rehydrate all repeat blocks from the database into Redis, along with supporting infrastructure for handling midnight-crossing repeat block intervals. The feature includes a new response DTO, service implementation with error handling, updated repeat-block serialization logic, and comprehensive test coverage. Changes
Sequence DiagramsequenceDiagram
participant Admin as Admin User
participant Controller as AdminPolicyController
participant Service as AdminPolicyServiceImpl
participant Redis as Redis
participant DB as Database
participant WriteThrough as TrafficPolicyWriteThroughService
Admin->>Controller: POST /repeat-blocks/rehydrate-all
activate Controller
Controller->>Service: rehydrateAllRepeatBlocksToRedis()
activate Service
Service->>Redis: KEYS repeat_block:*
Redis-->>Service: matching keys
Service->>Service: Parse lineIds from keys
loop for each lineId
Service->>DB: Fetch repeat blocks by lineId
DB-->>Service: repeat blocks list
Service->>WriteThrough: syncRepeatBlockUntracked(lineId, blocks, version)
activate WriteThrough
WriteThrough->>Redis: Write/update repeat block hashes
WriteThrough-->>Service: PolicySyncResult
deactivate WriteThrough
Service->>Service: Track success/failure
end
Service-->>Service: Build response (counts + failed IDs)
Service-->>Controller: RepeatBlockRehydrateAllResDto
deactivate Service
Controller-->>Admin: HTTP 200 + response body
deactivate Controller
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
개요
관련 BackLog
Resolves: (Backlog Number, ...)
PR 유형
PR Checklist
Summary by CodeRabbit
New Features
Improvements
Tests