-
Notifications
You must be signed in to change notification settings - Fork 0
<fix>[migration]: fix batch migration error #3169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.5.0
Are you sure you want to change the base?
Conversation
queuing operations to sync the same primary storage capacity. Resolves/Related: ZSTAC-81028 Change-Id: I73726668696e6a68756b726c6f6c637273706774
大致流程对主存储同步物理容量的流程进行了改造,引入 SingleFlightTask 机制实现并发去重。将直接同步完成的流程替换为单飞任务包装的流程,确保并发请求共享单一执行。 变更清单
序列图sequenceDiagram
participant Trigger
participant SingleFlight as SingleFlightTask<br/>(按UUID去重)
participant SyncLogic as syncPhysicalCapacity<br/>业务逻辑
participant Updater as PrimaryStorageCapacityUpdater
rect rgba(100, 200, 150, 0.2)
Note over Trigger,Updater: 新流程:单飞去重容量同步
end
Trigger->>SingleFlight: singleFlightSubmit(签名)
alt 首次执行
SingleFlight->>SyncLogic: 执行同步物理容量
SyncLogic->>SyncLogic: 采集容量数据
SyncLogic->>Updater: 容量数据
Updater->>Updater: 更新存储容量
Updater-->>SingleFlight: 更新完成
SingleFlight->>SingleFlight: 标记成功结果
else 执行失败
SyncLogic-->>SingleFlight: 异常
SingleFlight->>SingleFlight: 记录失败结果
end
SingleFlight-->>Trigger: 返回任务结果
alt 结果成功
Trigger->>Trigger: 继续执行 trigger.next()
else 结果失败
Trigger->>Trigger: 触发失败处理
end
rect rgba(150, 150, 200, 0.2)
Note over SingleFlight: 并发请求 ◇ 共享结果
end
代码审查工作量估计🎯 3 (中等) | ⏱️ ~20 分钟 诗
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.*⚙️ CodeRabbit configuration file
Files:
**/*.java⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📓 Common learnings🔇 Additional comments (2)
Comment |
queuing operations to sync the same primary storage capacity.
Resolves/Related: ZSTAC-81028
Change-Id: I73726668696e6a68756b726c6f6c637273706774
sync from gitlab !8986