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: preparation for inline writes #26429

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

danhhz
Copy link
Contributor

@danhhz danhhz commented Apr 4, 2024

There are a number of mechanical bits in #19383 that can easily be separated out. Do so in a separate PR to keep that one focused on the interesting diffs (as much as possible).

See individual commits for details. This PR is not terribly motivated on its own, definitely look at the other one for the context of why these things are happening.

Motivation

  • This PR refactors existing code.

Tips for reviewer

Intended to be no behavior change.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered.
  • 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).
  • This PR includes the following user-facing behavior changes:

@danhhz danhhz requested review from bkirwi and a team April 4, 2024 15:25
@danhhz danhhz requested a review from a team as a code owner April 4, 2024 15:25
Copy link

shepherdlybot bot commented Apr 4, 2024

Risk Score:83 / 100 Bug Hotspots:0 Resilience Coverage:16%

Mitigations

Completing required mitigations increases Resilience Coverage.

  • (Required) Code Review 🔍 Detected
  • (Required) Feature Flag
  • (Required) Integration Test
  • (Required) Observability
  • (Required) QA Review
  • (Required) Run Nightly Tests
  • Unit Test
Risk Summary:

The pull request poses a high risk with a score of 83, mainly driven by the average line count and the number of executable lines within the files modified. Historically, pull requests with these characteristics are 126% more likely to introduce bugs compared to the baseline for this repository. Although the observed bug trend in the repository is increasing, the predicted trend is decreasing, indicating an expected improvement in the near future.

Note: The risk score is not based on semantic analysis but on historical predictors of bug occurrence in the repository. The attributes above were deemed the strongest predictors based on that history. Predictors and the score may change as the PR evolves in code, time, and review activity.

Copy link
Contributor

@bkirwi bkirwi left a comment

Choose a reason for hiding this comment

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

Thanks for the updates!

There are some CI timeouts, but I suspect they're unrelated to this PR. When CI is satisfied I am satisfied also!

danhhz added 5 commits April 4, 2024 14:03
We've gotten somewhat lucky so far to be able to more-or-less pick a
default set of configuration values for persist unit tests, perhaps
adding a couple new tests for the non-default cases. But inline writes
probably wants to keep testing coverage of both the enabled and disabled
path in perpetuity.

So, introduce a new `mz_persist_proc::test` prod macro that runs an
entire cargo test under an arbitrary set of configurations and hook it
up to persist's tests.

Intentionally don't add a lint requiring its usage because many tests
don't use configuration and so running them multiple times would be pure
waste. Particularly egregious would be the various randomized prop
tests (e.g. for encoding).
We would have otherwise had to add a third level of Result in inline
writes.
We'll need it in inline writes to implement the method that flushes a
batch out to s3.
Used by the upcoming inline writes PR to disable it for the two
datadriven files that don't make sense with inline writes (testing blob
things).
Separating out some of the mechanical bits from the inline writes PR. It
works essentially by adding a second `Inline` variant to this enum.
@danhhz danhhz force-pushed the persist_inline_prep branch from 25f03c8 to 2e3f4b1 Compare April 4, 2024 21:06
@danhhz
Copy link
Contributor Author

danhhz commented Apr 4, 2024

TFTR! Merging once this nightlies run confirms that there indeed is no behavior change (as intended)

@danhhz danhhz enabled auto-merge April 4, 2024 21:49
@danhhz danhhz merged commit fe25ab8 into MaterializeInc:main Apr 4, 2024
73 checks passed
@danhhz danhhz deleted the persist_inline_prep branch April 4, 2024 22:13
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