<fix>[db]: allow null hostUuid on shared model cache policy - #4692
<fix>[db]: allow null hostUuid on shared model cache policy#4692ZStack-Robot wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 3 minutes Limit details: You’ve used the included review currently available. Your 96 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day 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)
Warning
|
| Layer / File(s) | Summary |
|---|---|
允许缓存策略共享conf/db/upgrade/V5.5.32__schema.sql |
数据库迁移将 AiHostModelCachePolicyVO.hostUuid 从 VARCHAR(32) 非空字段修改为可空字段。 |
Estimated code review effort: 1 (Trivial) | ~2 minutes
Merge Risk: 🔵 Low · up to 9731a
Allowing shared policies with a null hostUuid removes database-level uniqueness for identical shared entries, so concurrent writes or retries could create duplicates unless the write path safely coalesces them. The change is otherwise localized and mergeable with explicit owner follow-up on concurrency-safe deduplication.
Suggested reviewers: alanjager
Poem
兔子敲下迁移键,
主机绑定变轻盈。
缓存策略可共享,
空值也能稳稳行。
耳朵一竖,发布成。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题准确概括了核心变更:允许共享模型缓存策略的 hostUuid 为空。 |
| Description check | ✅ Passed | 描述与变更直接相关,并说明了数据库修改、唯一键保留、问题编号和验证结果。 |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/ye.zou/fix/ZSTAC-87753
Comment @coderabbitai help to get the list of available commands.
Resolves: ZSTAC-87753 Primary-storage model cache policies become resource-level rows shared by all hosts; shared rows carry hostUuid NULL, so the column must be nullable. The (hostUuid, sourceRootIdentity) unique key is kept: MySQL treats NULLs as distinct, and duplicate shared rows are collapsed in code on write. Change-Id: I56dbaf8b881619479b192bca710d8d8b86e96f19
9731abd to
4959474
Compare
Resolves: ZSTAC-87753
主存储缓存策略改为资源级共享后(hostUuid 置空),
AiHostModelCachePolicyVO.hostUuid需要允许 NULL。V5.5.32__schema.sql追加幂等ALTER TABLE ... MODIFY COLUMN hostUuid VARCHAR(32) NULL配套:premium fix/ZSTAC-87753 → feature-5.5.32-aios
验证:容器 pr-build-bin:2.41test-4 双仓挂载,deploydb 后 AiHostModelCacheControlPlaneCase / AiHostModelCacheStorageAccountingCase / ModelServiceCase 全 PASS。
sync from gitlab !10745