Skip to content

Commit

Permalink
Refactor import statements, change visibility, and add module in `Cat…
Browse files Browse the repository at this point in the history
…alogController` and `DdlController`
  • Loading branch information
Shanicky Chen committed Oct 30, 2023
1 parent 30337ef commit 2221c55
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/meta/model_v2/src/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use risingwave_pb::meta::table_fragments::fragment::PbFragmentDistributionType;
use sea_orm::entity::prelude::*;

use crate::{FragmentId, FragmentVnodeMapping, StreamNode, TableId, U32Array, VnodeBitmap};
use crate::{FragmentId, FragmentVnodeMapping, StreamNode, TableId, U32Array};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "fragment")]
Expand Down
11 changes: 5 additions & 6 deletions src/meta/src/controller/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

use std::iter;

use anyhow::{anyhow, Context};
use anyhow::anyhow;
use itertools::Itertools;
use risingwave_common::bail;
use risingwave_common::catalog::{DEFAULT_SCHEMA_NAME, SYSTEM_SCHEMAS};
use risingwave_common::util::stream_graph_visitor::visit_stream_node;
use risingwave_meta_model_v2::object::ObjectType;
use risingwave_meta_model_v2::prelude::*;
use risingwave_meta_model_v2::{
Expand Down Expand Up @@ -55,8 +54,8 @@ use crate::{MetaError, MetaResult};

/// `CatalogController` is the controller for catalog related operations, including database, schema, table, view, etc.
pub struct CatalogController {
env: MetaSrvEnv,
inner: RwLock<CatalogControllerInner>,
pub(crate) env: MetaSrvEnv,
pub(crate) inner: RwLock<CatalogControllerInner>,
}

#[derive(Clone, Default)]
Expand All @@ -80,8 +79,8 @@ impl CatalogController {
}
}

struct CatalogControllerInner {
db: DatabaseConnection,
pub(crate) struct CatalogControllerInner {
pub(crate) db: DatabaseConnection,
}

impl CatalogController {
Expand Down
Loading

0 comments on commit 2221c55

Please sign in to comment.