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

feat(meta): support drop creating materialized views for v2 backend #17503

Merged
merged 57 commits into from
Jul 16, 2024

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Jun 28, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Closes #14471

Notify catalog to fe in the following places:

  • start create ddl (all ddl catalog)
  • start create ddl (all internal tables)
  • Cancel for all ddls.
  • Delete for all ddls.
  • Clean dirty jobs.
  • Change add to update for finish jobs.

Similar to #17484. See that PR's description for further details.

Main difference between v1 and v2 is that in v2 we report all catalogs to fe. Because all catalogs are immediately committed.
But we don't do the same for v1 yet, since for v1, only MVs' catalogs are immediately committed.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@kwannoel kwannoel force-pushed the kwannoel/mark-creating-v2 branch from eaa467c to db45d28 Compare July 4, 2024 06:33
Base automatically changed from kwannoel/mark-creating to main July 4, 2024 11:45
src/config/ci.toml Outdated Show resolved Hide resolved
@kwannoel
Copy link
Contributor Author

kwannoel commented Jul 8, 2024

Bump

@kwannoel kwannoel requested a review from chenzl25 July 8, 2024 06:35
Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

Rest LGTM.

src/meta/src/controller/streaming_job.rs Outdated Show resolved Hide resolved
src/meta/src/barrier/mod.rs Show resolved Hide resolved
@kwannoel kwannoel requested a review from yezizp2012 July 8, 2024 08:24
############## Test drop foreground mv
onlyif can-use-recover
system ok
psql -h localhost -p 4566 -d dev -U root -c 'create materialized view m1 as select * from t;' &
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work under parallelism execution since the database name won't be dev anymore. 😕

Copy link
Contributor Author

@kwannoel kwannoel Jul 15, 2024

Choose a reason for hiding this comment

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

Parallel execution won't run this test. Because trigger recovery in one test thread will affect the execution of another test thread.

Copy link
Member

Choose a reason for hiding this comment

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

Can use ./risedev psql -c

src/meta/src/barrier/mod.rs Show resolved Hide resolved
@kwannoel
Copy link
Contributor Author

Bump

@kwannoel kwannoel requested a review from BugenZhao July 15, 2024 07:17
Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

Not quite familiar with the meta part, may forward to @yezizp2012 for better insights. 🥺 Rest LGTM

############## Test drop foreground mv
onlyif can-use-recover
system ok
psql -h localhost -p 4566 -d dev -U root -c 'create materialized view m1 as select * from t;' &
Copy link
Member

Choose a reason for hiding this comment

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

Can use ./risedev psql -c

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM, seems like risedev-env is not set correctly.

[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/tmp/fsio_0TY8YHlAuc.sh" "-c" "create materialized view m1 as select * from t;"
risedev-env file not found. Did you start cluster using ./risedev d or ./risedev p?

Comment on lines +15 to +20
mkdir -p .risingwave/config
cat <<EOF > .risingwave/config/risedev-env
RW_META_ADDR="http://127.0.0.1:5690"
RISEDEV_RW_FRONTEND_LISTEN_ADDRESS="127.0.0.1"
RISEDEV_RW_FRONTEND_PORT="4566"
EOF
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest doing this in the playground binary so that developers can also benefit from it locally. This is to address #17090. Can do it in next PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea.

@kwannoel kwannoel added this pull request to the merge queue Jul 16, 2024
@kwannoel kwannoel removed this pull request from the merge queue due to a manual request Jul 16, 2024
@kwannoel kwannoel added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit 5a56574 Jul 16, 2024
32 of 34 checks passed
@kwannoel kwannoel deleted the kwannoel/mark-creating-v2 branch July 16, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support DROP MATERIALIZED VIEW for materialized views which are being created
3 participants