Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5232,7 +5232,7 @@ public static class GCPoolCmd extends AgentCommand {
public String poolUuid;
public String mountPoint;
public boolean force;
public List<VolumeTO> volumes;
public List<String> inUseCacheUuids;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

协议字段名与既定跨仓契约不一致,需改为 whiteList

Line 5235 当前为 inUseCacheUuids,与本 PR 目标及联动仓约定的 whiteList 不一致,会导致按 whiteList 读取的一侧拿不到保留列表,GC 行为可能回退为错误删除路径。建议此处字段名改为 whiteList(类型保持 List<String>)。

🔧 建议修改
-        public List<String> inUseCacheUuids;
+        public List<String> whiteList;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public List<String> inUseCacheUuids;
public List<String> whiteList;
🤖 Prompt for 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.

In `@plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java` at line 5235,
The field name in the KVMAgentCommands class uses inUseCacheUuids but must
follow the cross-repo protocol name whiteList; rename the public field
inUseCacheUuids to whiteList while keeping its type as List<String> (update any
references/usages of inUseCacheUuids accordingly, e.g., in serializers,
constructors, getters/setters, and any code that reads/writes this field) so the
agent will serialize/deserialize with the agreed contract.

}

public static class AllocateCacheCmd extends AgentCommand {
Expand Down