<fix>[storage]: delete image cache shadow with local storage#4339
<fix>[storage]: delete image cache shadow with local storage#4339zstack-robot-2 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 26 minutes and 1 second. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough迁移脚本将 ChangesImageCacheShadow 级联清理
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@conf/db/zsv/V5.1.0__schema.sql`:
- Around line 264-265: `ImageCacheShadowVO.primaryStorageUuid` is being
constrained before historical rows are cleaned up; update the migration flow
around `ADD_CONSTRAINT`/`DROP_FOREIGN_KEY` for `ImageCacheShadowVO` so any
orphaned `primaryStorageUuid` values are backfilled or removed first, then add
the foreign key. Make the fix in the schema migration path that introduces
`fkImageCacheShadowVOPrimaryStorageEO`, ensuring the `NOT NULL` column will not
cause upgrade failure when old invalid references exist.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5bbd1aa0-c054-42fa-bad8-ef3dc3461068
📒 Files selected for processing (2)
conf/db/zsv/V5.1.0__schema.sqltest/src/test/groovy/org/zstack/test/integration/storage/primary/local/CleanImageCacheOnLocalPrimaryStorageCase.groovy
a0c5340 to
49780ba
Compare
Resolves: ZSV-7712 Test: CleanImageCacheOnLocalPrimaryStorageCase Change-Id: I67fa5c8bba2cc8e3a0b6bc8f94e28546b42e4467
49780ba to
e3ab18d
Compare
Resolves: ZSV-7712
Test: CleanImageCacheOnLocalPrimaryStorageCase
Change-Id: I67fa5c8bba2cc8e3a0b6bc8f94e28546b42e4467
sync from gitlab !10300