Skip to content
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

[persist] Prioritize structured data in the batch builder #30643

Merged
merged 5 commits into from
Dec 21, 2024

Conversation

bkirwi
Copy link
Contributor

@bkirwi bkirwi commented Nov 27, 2024

  • Set some structured-data configs by default.
  • Encode to both codec and structured data when building user batches.

This is a nice milestone: it's the last codepath that could only handle codec data; now both are always handled in parallel. However, we don't allow disabling codec-data writes yet!

Motivation

Part of: https://github.com/MaterializeInc/database-issues/issues/7411

Tips for reviewer

Lots of code movement... might be easiest to follow commit-by-commit.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@bkirwi
Copy link
Contributor Author

bkirwi commented Nov 27, 2024

@bkirwi bkirwi marked this pull request as ready for review November 28, 2024 15:50
@bkirwi bkirwi requested a review from a team as a code owner November 28, 2024 15:50
Copy link
Member

@ParkMyCar ParkMyCar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

@@ -65,7 +65,7 @@ pub enum BatchColumnarFormat {
impl BatchColumnarFormat {
/// Returns a default value for [`BatchColumnarFormat`].
pub const fn default() -> Self {
BatchColumnarFormat::Row
BatchColumnarFormat::Both(2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo!! 🚀

This requires updating the threshold in some tests... the new stuff uses
the `goodbytes` estimates, which exclude some stuff that used to be
included.
Previously this was split between BatchBuilder and BatchBuilderInternal;
now it's all in BatchBuilder, and the lower-level code only deals with
part-size chunks.
@bkirwi bkirwi force-pushed the structured-first branch 2 times, most recently from 78c33ea to 5ebea69 Compare December 19, 2024 14:58
@bkirwi
Copy link
Contributor Author

bkirwi commented Dec 19, 2024

Picking this up again now that we're widely rolled out, it turns out that some benchmarks are showing regressions after the final commit.

I didn't have time to chase that error down before the holidays, so I'm going to slice that commit off and try to get the rest of this merged so it doesn't rot by the time I'm back...

@bkirwi bkirwi merged commit 1a43f8b into MaterializeInc:main Dec 21, 2024
132 checks passed
@bkirwi bkirwi deleted the structured-first branch December 21, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants