fix(thin): reduce log noise from not-yet-bound PVC in ShouldUpdateUFS #6233
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6233"
general
weight: 0.35
cheyang
Ⅰ. Describe what this PR does
Follow-up to #6187 and fixes #6203.
When
updateFuseConfigOnChangewas updated to propagate the error fromtransformFuseConfig(#6187), the callerShouldUpdateUFSbegan unconditionally logging all errors atErrorlevel:When a Dataset specifies a
pvc://mount whose PVC is not yet bound (ClaimPendingor emptyVolumeName),extractVolumeInforeturns an error. This is a normal, transient self-resolving state during provisioning, butShouldUpdateUFSemitted anErrorlog roughly once per sync period (default 5s) until the PVC bound, causing sustained log noise and triggering alerts wired to controller error rates.Following approach 2 outlined in #6203:
1. Introduce a typed sentinel error
var ErrPVCNotBound = errors.New("persistent volume claim not bounded yet")inpkg/ddc/thin.2. Wrap
ErrPVCNotBoundinextractVolumeInfowhen checkinglen(pvc.Spec.VolumeName) == 0 || pvc.Status.Phase != corev1.ClaimBound.3. In
ShouldUpdateUFS, checkif errors.Is(err, ErrPVCNotBound):- If true, demote to
t.Log.V(1).Info("PVC is not bounded yet, will update fuse config once bounded", "error", err).- Otherwise, preserve
t.Log.Error(err, "Failed to update fuse config")for all unexpected errors.Ⅱ. Does this pull request fix one issue?
fixes #6203
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
pkg/ddc/thin/transform_config_test.go:- Added Ginkgo spec in
ThinEngine extractVolumeInfoverifyingErrPVCNotBoundis returned when a PVC is pending.- Added
errors.Is(err, ErrPVCNotBound)assertion to the existing pending PVC test inThinEngine transformFuseConfig.pkg/ddc/thin/ufs_ginkgo_test.go:- Added spec
demotes log to V(1) and returns nil when a pvc mount is not yet boundverifying zero Error logs and the V(1) info message.- Added spec
logs an error and returns nil when updateFuseConfigOnChange fails with an unexpected errorverifying unexpected errors still log at Error level.pkg/ddc/thin/ufs_test.go:- Added table case
"transform fuse config failed due to pending pvc"toTestThinEngine_updateFuseConfigOnChangeassertingwantErrIs: ErrPVCNotBound.Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
None.