Skip to content

persist: add allow_compaction() operator#10029

Merged
aljoscha merged 1 commit into
MaterializeInc:mainfrom
aljoscha:persist-add-allow-compaction-operator
Jan 13, 2022
Merged

persist: add allow_compaction() operator#10029
aljoscha merged 1 commit into
MaterializeInc:mainfrom
aljoscha:persist-add-allow-compaction-operator

Conversation

@aljoscha
Copy link
Copy Markdown
Contributor

This operator will be used to allow compaction for persisted sources.

The rustdoc and comments have all the information.

Checklist

The first commit is from #9938, and makes testing simpler. Without it I would have to first seal up to some frontier beyond my testing compaction frontiers, which would add chaff to the tests.

  • This PR has adequate test coverage / QA involvement has been duly considered.
  • [N/A] This PR adds a release note for any user-facing behavior changes.

@aljoscha aljoscha requested a review from danhhz January 13, 2022 14:29
@aljoscha
Copy link
Copy Markdown
Contributor Author

I spun this off from #9981, so that we have the operator (and tests) isolated in one PR.

Copy link
Copy Markdown
Contributor

@danhhz danhhz left a comment

Choose a reason for hiding this comment

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

Very good, I like this much better than the -1!

Comment thread src/persist/src/operators/stream.rs Outdated
// need to be careful not to advance the compaction frontier up to the seal frontier, for
// which the input frontier is a proxy.
let mut candidate_compaction_frontier: Antichain<u64> =
Antichain::from_elem(timely::progress::Timestamp::minimum());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: add a use for timely::progress::Timestamp at the top of the file

Comment thread src/persist/src/operators/stream.rs Outdated
effective_input_frontier
);

let future = write.allow_compaction(compaction_frontier.clone());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

super nit: future is a common module name. I've seen petros use "fut" for this, which I like

});
}

// Swing through all pending futures and see if they're ready. Ready futures will
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but really seems like a bunch of these operator impls have a pretty common pattern that we could maybe extract.

This operator will be used to allow compaction for persisted sources.

The rustdoc and comments have all the information.
@aljoscha aljoscha force-pushed the persist-add-allow-compaction-operator branch from 2358f08 to 5fd4d4f Compare January 13, 2022 16:23
@aljoscha aljoscha merged commit eaa2eaa into MaterializeInc:main Jan 13, 2022
@aljoscha aljoscha deleted the persist-add-allow-compaction-operator branch January 13, 2022 17:15
@aljoscha
Copy link
Copy Markdown
Contributor Author

tftr! I incorporated the nits.

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