-
Notifications
You must be signed in to change notification settings - Fork 487
Assert diffs sum does not change when swapping in spine batches #32605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'll follow up with a full review when I can, but two quick things to check in on:
|
|
Ah yep. I made it generic, but most invocations now call it like p.diffs_sum::<Diff>(metrics)
.expect("new batch must have diffs sum")where |
df60a3c to
661fc16
Compare
| .iter() | ||
| .filter_map(|p| p.diffs_sum::<Diff>(&metrics.columnar)) | ||
| .sum::<Diff>() | ||
| .encode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a forward-compat hazard, since older versions don't have this field in the schema and would discard it.
Normally I'd suggest doing what you did for other PRs, but in this case I think it may be fine without a new flag... the hollow run stuff is already behind the max_run_len rollout flag, which is off in staging / prod. Though it is on in CI, so we may have to do some tweaking there.
bkirwi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Overall shape seems good.
There remains a bunch of almost-duplicated code with subtle differences, which makes me a bit nervous and is kind of hard to review. I made one suggestion at a small scale (summing diffs of parts) but if there are any other ideas you think have a good cost-benefit ratio I think they're probably worthwhile!
There's a fair bit of red in the nightlies, but I haven't taken a look in detail - let me know if you want a second pair of eyes there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of code movement so this is a little hard to verify... but I think this is good! (And nightlies look pretty clean.) Appreciate all the cleanup.
One nit that I think is worth dealing with before merging, but otherwise this seems good to go.
We've verified that the fixed version of this still errors on the bad change in CI, yeah?
I did a run here: https://buildkite.com/materialize/nightly/builds/12213. Seeing lots of so it seems good! |
Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.