feat(cache): bind a CacheRuntime to a snapshot of its CacheRuntimeClass #6242
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 315 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #6242"
general
weight: 0.35
cheyang
Ⅰ. Describe what this PR does
Editing a CacheRuntimeClass can currently change existing CacheRuntimes on their next reconcile. This PR binds each runtime to an immutable snapshot at its first Setup, so later class edits or deletion leave existing runtimes unchanged.
The snapshot covers the whole class, including component templates, options and data operation definitions, to keep images, configuration and scripts on the same version. It is stored in
fluid-runtime-class-snapshot-<runtime>, a ConfigMap owned by the CacheRuntime.runtimeClassNamekeeps the existing binding and emits a warning. Recreate the CacheRuntime to use a different class version.Also avoids workload updates caused only by reordered resource claims, and updates the English and Chinese guides for snapshot behavior and Pod updates.
Ⅱ. Does this pull request fix one issue?
Fixes #6213.
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Unit tests cover snapshot creation and ownership, class edits and deletion, invalid snapshots, cache lag, safe cleanup, read-only data operations, and resource claim ordering.
The curvine e2e adds a check that class resource edits do not reach an existing worker, while a runtime replica change still takes effect.
Ⅳ. Describe how to verify it
On a cluster, create a CacheRuntime, edit its class resources, and trigger a reconcile. The worker resources should stay unchanged. Updating the CacheRuntime's own resource overrides should still apply.
Ⅴ. Special notes for reviews
CacheRuntime has not been released; migration from earlier development builds is not included. Unlike the original #6213 sketch, this snapshots the whole class, following #6239.
The curvine e2e was syntax-checked locally, but was not run on kind.