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: add state for source manager #3170

Merged
merged 6 commits into from
Jun 13, 2022
Merged

feat: add state for source manager #3170

merged 6 commits into from
Jun 13, 2022

Conversation

shanicky
Copy link
Contributor

@shanicky shanicky commented Jun 13, 2022

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

as title

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

Signed-off-by: Peng Chen <peng@singularity-data.com>
Signed-off-by: Peng Chen <peng@singularity-data.com>
Signed-off-by: Peng Chen <peng@singularity-data.com>
Signed-off-by: Peng Chen <peng@singularity-data.com>
Copy link
Contributor

@tabVersion tabVersion left a comment

Choose a reason for hiding this comment

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

source part lgtm

Signed-off-by: tabVersion <tabvision@bupt.icu>
@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #3170 (a37fff6) into main (68d81ab) will decrease coverage by 0.03%.
The diff coverage is 45.12%.

@@            Coverage Diff             @@
##             main    #3170      +/-   ##
==========================================
- Coverage   73.55%   73.52%   -0.04%     
==========================================
  Files         736      736              
  Lines      101051   101206     +155     
==========================================
+ Hits        74326    74409      +83     
- Misses      26725    26797      +72     
Flag Coverage Δ
rust 73.52% <45.12%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/meta/src/stream/source_manager.rs 27.81% <44.00%> (+8.22%) ⬆️
src/meta/src/stream/stream_manager.rs 69.11% <55.00%> (+0.17%) ⬆️
src/meta/src/manager/catalog.rs 20.21% <0.00%> (+1.06%) ⬆️
src/meta/src/stream/meta.rs 49.27% <0.00%> (+1.15%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@@ -623,9 +612,32 @@ where
/// Dropping materialized view is done by barrier manager. Check
/// [`Command::DropMaterializedView`] for details.
pub async fn drop_materialized_view(&self, table_id: &TableId) -> Result<()> {
let table_fragments = self
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get source_fragments directly from a new interface inside FragmentManager? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem to work, the table fragments are passed in as external parameters when creating materialized view, fetch_source_fragments is already the maximum level of abstraction

self.barrier_manager
.run_command(Command::DropMaterializedView(*table_id))
.await?;

let mut actor_ids = HashSet::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using Default::default here would make it impossible to derive the type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

@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.

@shanicky shanicky enabled auto-merge (squash) June 13, 2022 15:14
Signed-off-by: Peng Chen <peng@singularity-data.com>
@shanicky shanicky merged commit 6d98333 into main Jun 13, 2022
@shanicky shanicky deleted the peng/source-manager-state branch June 13, 2022 17:23
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.

None yet

3 participants