[host]: ping syncSignature per-host to prevent queue serialization#3948
Open
ZStack-Robot wants to merge 2 commits into
Open
[host]: ping syncSignature per-host to prevent queue serialization#3948ZStack-Robot wants to merge 2 commits into
ZStack-Robot wants to merge 2 commits into
Conversation
getSyncSignature() 从固定 "do-ping-host" 改为 "do-ping-host-<hostUuid>", 避免所有物理机 ping 排队在同一个 SyncTaskChain 上互相阻塞。 Resolves: ZSTAC-83192, ZSTAC-79389 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
验证 getSyncSignature() 返回 per-host key 后: - 同一签名串行执行(same signature = same queue) - 不同签名并行执行(different host = different queue) Related: ZSTAC-83192 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
概述Ping任务的同步签名从全局常量改为包含目标主机UUID的动态值,使不同主机的Ping任务可独立并发调度。新增测试类验证同签名任务序列执行和异签名任务并发执行的行为。 变更每主机Ping任务同步
代码审查工作量估计🎯 2 (简单) | ⏱️ ~10 分钟 诗
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/src/test/java/org/zstack/test/core/thread/TestDispatchQueuePerHostSignature.java (1)
20-20: ⚡ Quick win测试类命名不符合仓库规范。
Line 20 的类名
TestDispatchQueuePerHostSignature未以Test或Case结尾,建议改为DispatchQueuePerHostSignatureTest,并同步文件名。
As per coding guidelines “测试类需要以 Test 或 Case 结尾。”🤖 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 `@test/src/test/java/org/zstack/test/core/thread/TestDispatchQueuePerHostSignature.java` at line 20, Rename the test class TestDispatchQueuePerHostSignature to follow the repository convention by changing the class name to DispatchQueuePerHostSignatureTest and update the containing Java file name accordingly; ensure all references to TestDispatchQueuePerHostSignature in imports, test suites, or build configs are updated to the new class name to avoid compilation failures.
🤖 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.
Nitpick comments:
In
`@test/src/test/java/org/zstack/test/core/thread/TestDispatchQueuePerHostSignature.java`:
- Line 20: Rename the test class TestDispatchQueuePerHostSignature to follow the
repository convention by changing the class name to
DispatchQueuePerHostSignatureTest and update the containing Java file name
accordingly; ensure all references to TestDispatchQueuePerHostSignature in
imports, test suites, or build configs are updated to the new class name to
avoid compilation failures.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)
Review profile: CHILL
Plan: Pro
Run ID: 0aab5719-69dc-41f5-992e-122f5f52f1dc
📒 Files selected for processing (2)
compute/src/main/java/org/zstack/compute/host/HostBase.javatest/src/test/java/org/zstack/test/core/thread/TestDispatchQueuePerHostSignature.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: ZSTAC-80543
sync from gitlab !9839