[fix](ivm) Use Stream versions for Cloud IVM scans and pruning #70880
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 509 lines diff across 6 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.373
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #70880"
general
weight: 0.35
morrySnow
Background
Cloud IVM uses the Stream's consumption offset, end TSO, and partition visible version from Meta Service. Incremental joins combine changes with base table snapshots. A COMPLETE refresh rebuilds rows and resets the Stream baseline. A partial rebuild can read a dimension at its previous consumption offset and hold the task's recorded snapshots until the incremental refresh catches up.
What problem does this PR solve?
Issue Number: None
Related PR: #62606 (incremental join rewrite), #68390 (partition rebuild bookkeeping), #69850 (stream partition scan state)
PR Type: Bugfix
Problem Summary:
Cloud IVM reads could skip rows or report a partition as current while the FE cache lagged Meta Service. With FE at partition version 1 and Meta Service at version 2, a COMPLETE refresh used to advance the Stream but miss the inserted row
(7, 100). A partial rebuild in the same version mismatch could report success and leave an empty MV with pending Stream data. The fix makes scan planning and freshness checks use the Stream's read state so the COMPLETE refresh sees the row and the partial rebuild keeps its metadata pending until the delta catches up.Details
Testing
The FE build passed with zero Checkstyle violations. Cloud baseline and candidate runs used the same partial-rebuild scenario. The baseline reported success, left the MV empty, and did not catch up the Stream. The candidate reported the injected delta failure, then produced both expected join rows and brought the Stream to zero lag on retry. The next refresh rebuilt zero partitions. The final candidate passed 108 FE unit tests and eight targeted Cloud suites. The earlier snapshot-context commit passed 591 FE tests and all 134 Cloud IVM suites. The COMPLETE comparison recovered
(7, 100)and advanced the Stream when the FE cache still showed version 1.Release note
Cloud IVM now uses the selected Stream version consistently for join snapshots and empty-partition pruning. A partial rebuild that still needs its incremental changes remains pending until those changes are applied.
Check List (For Author)