← Back to Pull requests

fix(thin): reduce log noise from not-yet-bound PVC in ShouldUpdateUFS #6233

Closed
unknown closed this pull request without merging on Nov 12, 2026 04:58 UTC
View on GitHub
unknown unknown commented on Nov 08, 2026 06:48 UTC
Author

Ⅰ. Describe what this PR does

Follow-up to #6187 and fixes #6203.

When updateFuseConfigOnChange was updated to propagate the error from transformFuseConfig (#6187), the caller ShouldUpdateUFS began unconditionally logging all errors at Error level:

update, err := t.updateFuseConfigOnChange(t.runtime, dataset)
if err != nil {
	t.Log.Error(err, "Failed to update fuse config")
	return
}

When a Dataset specifies a pvc:// mount whose PVC is not yet bound (ClaimPending or empty VolumeName), extractVolumeInfo returns an error. This is a normal, transient self-resolving state during provisioning, but ShouldUpdateUFS emitted an Error log 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") in pkg/ddc/thin.
2. Wrap ErrPVCNotBound in extractVolumeInfo when checking len(pvc.Spec.VolumeName) == 0 || pvc.Status.Phase != corev1.ClaimBound.
3. In ShouldUpdateUFS, check if 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 extractVolumeInfo verifying ErrPVCNotBound is returned when a PVC is pending.
    - Added errors.Is(err, ErrPVCNotBound) assertion to the existing pending PVC test in ThinEngine 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 bound verifying zero Error logs and the V(1) info message.
    - Added spec logs an error and returns nil when updateFuseConfigOnChange fails with an unexpected error verifying unexpected errors still log at Error level.
  • pkg/ddc/thin/ufs_test.go:

  • - Added table case "transform fuse config failed due to pending pvc" to TestThinEngine_updateFuseConfigOnChange asserting wantErrIs: ErrPVCNotBound.

    Ⅳ. Describe how to verify it


    go test -v -gcflags="all=-N -l" ./pkg/ddc/thin/...
    go vet ./pkg/ddc/thin/...
    gofmt -l pkg/ddc/thin/
    

    Ⅴ. Special notes for reviews


    None.

    Diff: 323 lines (+242 / -81) across 4 files Reviewer: cheyang Review duration: 5649m
    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
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.0% (MEDIUM) · Higher = larger blast radius
    42.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.6% · Safe to merge
    16.6%