-
Notifications
You must be signed in to change notification settings - Fork 590
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
Changes from 53 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
6397ec9
update creating catalogs
kwannoel 2b825e3
decouple finish create table and finish create mv
kwannoel 0082554
refactor cancel
kwannoel fd6ff98
fix
kwannoel 3714af9
handle cancel path in drop
kwannoel d3d4605
handle delete catalog to fe after cancel
kwannoel ba91e6c
filter out creating tables by default
kwannoel cbd78a6
refactor created table getters + only make creating tables visible in…
kwannoel b9789a9
report catalog in v2, left internal tables
kwannoel 2dfb3e5
only commit internal tables
kwannoel 044525f
fix v1
kwannoel 7f51256
Revert "only commit internal tables"
kwannoel 6a47d92
add fixme for clean up stream jobs + return all tables on frontend su…
kwannoel 293f034
fix clean dirty tables for v1
kwannoel 33d94ce
notify internal table catalog for v2
kwannoel 99427d2
provide create job obj in finish_streaming_job
kwannoel 884793c
Revert "report catalog in v2, left internal tables"
kwannoel 339f089
Revert "notify internal table catalog for v2"
kwannoel c71f181
Revert "provide create job obj in finish_streaming_job"
kwannoel 8db729c
fix test utils
kwannoel 2753537
fix ut
kwannoel 09b8f88
rename get_table to get_any_table
kwannoel ba911e4
fix log
kwannoel 45ceed0
fix docs
kwannoel a188fb3
rm fixme
kwannoel 5bd5fc4
rename
kwannoel bd4f20a
Revert "Revert "report catalog in v2, left internal tables""
kwannoel cdcadf2
Revert "Revert "notify internal table catalog for v2""
kwannoel bcba4aa
Revert "Revert "provide create job obj in finish_streaming_job""
kwannoel 5bfcd49
refactor notification functionality
kwannoel d4445bc
report deleted dirty jobs catalog to fe
kwannoel d92e515
refactor logging out
kwannoel bef1421
notify on create
kwannoel b85f25f
notify delete for relation group
kwannoel c3c52ec
change add to update for finish jobs
kwannoel 3a4ef73
start create ddl (internal tables)
kwannoel b27ef7c
fix create catalog txn deadlock
kwannoel 80d7b12
handle fragment update
kwannoel b987025
fmt
kwannoel 2ac2a9e
fix
kwannoel 5fc93bb
fix
kwannoel ef45d8b
fix index test
kwannoel cd34f36
fmt
kwannoel 2df055b
add e2e test
kwannoel c3906f6
delete only after querying objects to cancel
kwannoel 8b69519
fix
kwannoel 4d125d5
permit recovery
kwannoel db45d28
use label
kwannoel f88a5b4
Merge branch 'main' into kwannoel/mark-creating-v2
kwannoel cb1325c
fix
kwannoel 60f4317
Merge branch 'main' into kwannoel/mark-creating-v2
kwannoel e2b75b3
allow adhoc recovery when disable_recovery set
kwannoel fcf50c2
revert refactor of oid to object
kwannoel ef85fde
make single node compat with risedev psql
kwannoel f62d7e6
fix path
kwannoel 3eb1c6e
fix
kwannoel 99186bf
Merge remote-tracking branch 'origin/main' into kwannoel/mark-creatin…
kwannoel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
statement ok | ||
create table t(v1 int); | ||
|
||
statement ok | ||
insert into t select * from generate_series(1, 10000); | ||
|
||
statement ok | ||
flush; | ||
|
||
statement ok | ||
set streaming_rate_limit=1; | ||
|
||
############## 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;' & | ||
|
||
onlyif can-use-recover | ||
sleep 5s | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
drop materialized view m1; | ||
|
||
############## Test drop background mv BEFORE recovery | ||
statement ok | ||
set background_ddl=true; | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
create materialized view m1 as select * from t; | ||
|
||
onlyif can-use-recover | ||
sleep 5s | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
drop materialized view m1; | ||
|
||
############## Test drop background mv AFTER recovery | ||
statement ok | ||
set background_ddl=true; | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
create materialized view m1 as select * from t; | ||
|
||
onlyif can-use-recover | ||
sleep 5s | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
recover; | ||
|
||
onlyif can-use-recover | ||
sleep 10s | ||
|
||
onlyif can-use-recover | ||
statement ok | ||
drop materialized view m1; | ||
|
||
############## Make sure the mv can still be successfully created later. | ||
statement ok | ||
set streaming_rate_limit=default; | ||
|
||
statement ok | ||
set background_ddl=false; | ||
|
||
statement ok | ||
create materialized view m1 as select * from t; | ||
|
||
statement ok | ||
drop materialized view m1; | ||
|
||
statement ok | ||
drop table t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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. 😕There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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