Skip to content

compute: make import frontier logging drop-safe#18531

Merged
teskje merged 1 commit into
MaterializeInc:mainfrom
teskje:drop-safe-import-frontier-logging
Apr 3, 2023
Merged

compute: make import frontier logging drop-safe#18531
teskje merged 1 commit into
MaterializeInc:mainfrom
teskje:drop-safe-import-frontier-logging

Conversation

@teskje

@teskje teskje commented Mar 31, 2023

Copy link
Copy Markdown
Contributor

This PR adjusts the LogImportFrontiers operator to make it emit retractions for previously logged events upon being dropped. This makes that operator safe to use with drop_dataflow, or any mechanism that drops dataflows without allowing their operators to shut down gracefully. Without this change, we would leave behind records in the import frontier logging collection.

Motivation

  • This PR adds a known-desirable feature.

Advances MaterializeInc/database-issues#835.

Tips for reviewer

A test is provided in #18442. I can't add one here because we don't have a way to spontaneously drop dataflows yet.

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.
  • This PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way) and therefore is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration, 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:
    • N/A

@teskje teskje mentioned this pull request Mar 31, 2023
32 tasks
@teskje teskje marked this pull request as ready for review March 31, 2023 16:07
@teskje teskje requested review from a team and vmarcos March 31, 2023 16:07

@antiguru antiguru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the idea, but would try to clone less information. This should be doable, but correct me if I'm wrong! Thank you!

Comment thread src/compute/src/logging/compute.rs Outdated
Comment thread src/compute/src/logging/compute.rs Outdated
@teskje teskje force-pushed the drop-safe-import-frontier-logging branch from 9a765f1 to b1c7046 Compare April 3, 2023 08:57
@teskje teskje requested a review from antiguru April 3, 2023 08:58
@teskje teskje force-pushed the drop-safe-import-frontier-logging branch from b1c7046 to 4d10e20 Compare April 3, 2023 09:17

@vmarcos vmarcos left a comment

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.

LGTM! Only a minor nit on a comment noted below.

Comment thread src/compute/src/logging/compute.rs Outdated
This commit adjusts the `LogImportFrontiers` operator to make it emit
retractions for previously logged events upon being dropped. This makes
that operator safe to use with `drop_dataflow`, or any mechanism that
drops dataflows without allowing their operators to shut down
gracefully. Without this change, we would leave behind records in the
import frontier logging collection.
@teskje teskje force-pushed the drop-safe-import-frontier-logging branch from 4d10e20 to 825d181 Compare April 3, 2023 12:15

@antiguru antiguru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

@teskje teskje merged commit 3064a84 into MaterializeInc:main Apr 3, 2023
@teskje teskje deleted the drop-safe-import-frontier-logging branch April 3, 2023 19:56
@teskje

teskje commented Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

TFTRs!

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.

3 participants