[fix](ivm) Check layout signatures during partition refresh #70839
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 428 lines diff across 5 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.363
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #70839"
general
weight: 0.35
morrySnow
Background
A merge-on-write incremental materialized view stores a signature of its normalized write plan. The signature protects row identity and aggregate state layout across refreshes. A partition refresh rebuilds a subset of the view from its base tables.
What problem does this PR solve?
Issue Number: None
Related PR: #70785 (establishes the signature on the first successful write)
PR Type: Bugfix
Problem Summary:
A partition refresh could write a different layout into part of a view while other partitions retained the stored layout. Compare the signature before each partition write. A strict refresh reports a mismatch and a request that allows fallback runs a whole-view COMPLETE.
| With a changed signature | Task result |
| --- | --- |
| Before |
SUCCESSwith a partial refresh || After |
FAILEDwithIVM layout signature mismatch|Details
MTMVTaskused the full refresh rewrite mode for partition rebuilds.IvmNormalizeUniqKeysMTMVcompared signatures for incremental writes, and the full mode only generated a candidate signature.test_ivm_plan_signature_fallbackchecked signature changes on the incremental write path. The partition rebuild regressions kept the layout fixed.Testing
test_ivm_partition_signature_fallbackreproduced a successful strict partition refresh with signature drift before the fix. The test passed with the fix and verified strict failures, unchanged rows, COMPLETE fallback, and a subsequent matching partition refresh.Release note
None.
Check List (For Author)