fix(jindo): remove duplicate send on MetadataSyncDoneCh in jindocache and jindofsx #6298
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 · 318 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.345
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #6298"
general
weight: 0.35
cheyang
Ⅰ. Describe what this PR does
Removes the duplicate unguarded channel send
resultChan <- resultafterbase.SafeSend(resultChan, result)insyncMetadataInternal()for bothJindoCacheEngine(pkg/ddc/jindocache/metadata.go) andJindoFSxEngine(pkg/ddc/jindofsx/metadata.go), and drops the leftoverresultChan <- resultinside the disabled comment block inpkg/ddc/jindo/metadata.go.Previously, because
MetadataSyncDoneChis unbuffered and the receiver reads at most once before settinge.MetadataSyncDoneCh = nil, the second send blocked the goroutine forever on every completed metadata sync, leaking a goroutine and bypassingdefer base.SafeClose(resultChan). Removing the duplicate send ensures each completed sync sends once viabase.SafeSend, closesresultChan, and exits cleanly.(Note: in
jindocacheandjindofsx, nothing outside the sync goroutine currently closesMetadataSyncDoneCh, so the goroutine leak is the reachable failure mode here; closingMetadataSyncDoneChon shutdown likealluxio/vineyardis tracked in #6308.)Ⅱ. Does this pull request fix one issue?
fixes #6297
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
VerifyMetadataSyncChannelClosedOnceinpkg/utils/testutil/metadata_sync.goTestSyncMetadataInternalChannelLifecycleinpkg/ddc/jindocache/metadata_test.goandpkg/ddc/jindofsx/metadata_test.goto verify that starting withMetadataSyncDoneCh == nilinitializes the channel, clears it on follow-up sync, and closes the channel cleanly without blocking on a duplicate send.Ⅳ. Describe how to verify it
Run the unit tests for
testutil,jindocache,jindofsx, andjindo:Ⅴ. Special notes for reviews
- Clarified the reachable failure mode (goroutine leak on completed metadata sync).
- Split
TestSyncMetadataInternalChannelLifecycleinto a dedicated test function in both engines.- Dropped dead
resultChan <- resultresidue inpkg/ddc/jindo/metadata.go.- Matches the
SafeSend-only pattern already used inalluxio,jindo,juicefs, andthin(#2536).