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

Update to latest Timely #31158

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Update to latest Timely #31158

merged 2 commits into from
Jan 29, 2025

Conversation

antiguru
Copy link
Member

Point Materialize at latest Timely. We need to incorporate some changes
around reachability logging, which is now typed, and event iterators that
return cow'ed data.

Some of the complexity stems from the fact that event links are
single-writer, so we need separate event links for each reachability log
variant.

Signed-off-by: Moritz Hoffmann [email protected]

Motivation

Tips for reviewer

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.

@antiguru antiguru requested a review from teskje January 23, 2025 15:19
@antiguru antiguru marked this pull request as ready for review January 23, 2025 15:19
@antiguru antiguru requested review from aljoscha, jkosh44 and a team as code owners January 23, 2025 15:19
Copy link
Contributor

@jkosh44 jkosh44 left a comment

Choose a reason for hiding this comment

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

Adapter changes LGTM

@jkosh44
Copy link
Contributor

jkosh44 commented Jan 27, 2025

Rebasing this over #31204 should fix the upgrade test panic.

Copy link
Contributor

@teskje teskje left a comment

Choose a reason for hiding this comment

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

LGTM, though I'd like to better understand why the multi-producer EventLink doesn't work.

And an independent observation: It feels bad that so many crates depend on Timely/DD even though they are not running any dataflows. Seems like Timely/DD internals could be better encapsulated in the cluster layer.

src/compute/src/logging.rs Outdated Show resolved Hide resolved
src/compute/src/logging/differential.rs Outdated Show resolved Hide resolved
})
.or_else(|| time_any.downcast_ref::<(Timestamp, Subtime)>().map(|t| t.0))
/// Helper trait to extract a timestamp from various types of timestamp used in rendering.
trait ExtractTimestamp: Clone + 'static {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

I thought we had an issue somewhere about not reporting reachability for WMR dataflows, that maybe we could consider fixed now (assuming we are happy with only reporting the top-level timestamp). But I can't find it now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe https://github.com/MaterializeInc/database-issues/issues/5271? I tested the example and it shows reachability data for the recursive scope (and it surfaced a bug in the reachability query, which I fixed in the second commit!):

CREATE TABLE t (a int);
INSERT INTO t VALUES (1);
CREATE MATERIALIZED VIEW mv AS
WITH MUTUALLY RECURSIVE
    numbers (n int) as (
        SELECT a FROM t
        UNION ALL
        (
            WITH rebound AS (SELECT * FROM numbers)
            SELECT distinct t1.n + t2.n AS n
            FROM rebound AS t1, rebound AS t2
            WHERE t1.n <= 256 AND t2.n <= 256
        )
    )
SELECT count(*) FROM numbers;

Point Materialize at latest Timely. We need to incorporate some changes
around reachability logging, which is now typed, and event iterators that
return cow'ed data.

Some of the complexity stems from the fact that event links are
single-writer, so we need separate event links for each reachability log
variant.

Signed-off-by: Moritz Hoffmann <[email protected]>
@antiguru antiguru merged commit 2ed27fe into MaterializeInc:main Jan 29, 2025
79 checks passed
@antiguru antiguru deleted the update_td branch January 29, 2025 14:30
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