<fix>[storage]: ZSV-12657 wait zbs clients before revert#4593
<fix>[storage]: ZSV-12657 wait zbs clients before revert#4593ZStack-Robot wants to merge 3 commits into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review 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 refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughZBS 数据卷快照回滚新增卷客户端释放等待机制,支持轮询、超时、中断和查询失败处理;集成测试验证客户端释放后才执行一次回滚。 ChangesZBS 快照回滚流程
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
b7adb93 to
c725911
Compare
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 `@plugin/zbs/src/main/java/org/zstack/storage/zbs/ZbsStorageController.java`:
- Around line 1060-1101: Refactor waitVolumeClientsReleased to use asynchronous
scheduled callbacks instead of the current while loop and
TimeUnit.SECONDS.sleep, so revertVolumeSnapshot’s message-processing thread is
never blocked during the release wait. Preserve the existing path validation,
active-client checks, timeout failure, operation-failure propagation, and
interruption-equivalent failure behavior through the callback chain, completing
ReturnValueCompletion only when clients are released or a terminal failure
occurs.
🪄 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: bb96fbf1-8817-4cc4-a990-595e2760f440
📒 Files selected for processing (2)
plugin/zbs/src/main/java/org/zstack/storage/zbs/ZbsStorageController.javatest/src/test/groovy/org/zstack/test/integration/storage/primary/addon/zbs/ZbsPrimaryStorageCase.groovy
c725911 to
17b88ce
Compare
|
Comment from yaohua.wu: Review: MR !10565 — ZSV-12657Background (preserved across rounds)
🟡 Warning (P2)
Upstream Freshness
Coverage
Verdict: APPROVED未发现 P0/P1 阻塞问题;建议在合并前补齐可配置 timeout 与失败分支回归测试。 🤖 Robot Reviewer |
17b88ce to
282ad9b
Compare
Wait for active ZBS volume clients to disappear before rolling back a volume snapshot. Add ZBS primary storage regression coverage for delayed client release before revert. Test: git diff --check Test: cbok zsv groovy_test ZbsPrimaryStorageCase Resolves: ZSV-12657 Change-Id: I3792c66a658e9cec77c3c322ce8f4e135414b534
288b4e9 to
a581db9
Compare
|
Comment from 刘志建: Code Review 汇总(仅本次 MR diff 范围)范围: 意图snapshot revert 前主动轮询 ZBS,直到 volume 的 CBD 客户端全部释放,避免在客户端仍持有 volume 时直接 revert 造成数据不一致或 revert 失败。加了两个全局配置(超时 100s、poll 间隔 1s)和两个测试用例(等待成功、超时失败)。 主要发现🔴 中风险 ·
|
Release the storage client during VM shutdown instead of polling in the snapshot revert path. Resolves: ZSV-12657 Change-Id: I274b3d6acf1dbfba53665ca75d53c0b5df62901b
Update the Java global config description to match the cold stop strategy. Test: git diff --check Resolves: ZSV-12657 Change-Id: I47b852c437f0c7baa61203d3256b35bdee5cf60a
Summary
Fix ZBS snapshot revert failure caused by a short window where VM stop has completed but the ZBS volume client is still active.
Changes
Testing
Resolves: ZSV-12657
sync from gitlab !10565