Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
Signed-off-by: tabVersion <[email protected]>
  • Loading branch information
tabVersion committed Oct 22, 2024
1 parent 3fcdb3f commit 8f994e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/handler/create_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn resolve_create_connection_payload(
return match connection_type.as_str() {
PRIVATELINK_CONNECTION => Err(RwError::from(ErrorCode::Deprecated(
"CREATE CONNECTION to Private Link".to_string(),
"RisingWave Cloud Portal".to_string(),
"RisingWave Cloud Portal (Please refer to the doc https://docs.risingwave.com/cloud/create-a-connection/)".to_string(),
))),
_ => Err(RwError::from(ProtocolError(format!(
"Connection type \"{connection_type}\" is not supported"
Expand Down
21 changes: 4 additions & 17 deletions src/meta/service/src/ddl_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ impl DdlService for DdlServiceImpl {
let req = request.into_inner();
let source = req.get_source()?.clone();

// validate connection before starting the DDL procedure
if let Some(connection_id) = source.connection_id {
self.validate_connection(connection_id).await?;
}

match req.fragment_graph {
None => {
let version = self
Expand Down Expand Up @@ -288,11 +283,6 @@ impl DdlService for DdlServiceImpl {
let fragment_graph = req.get_fragment_graph()?.clone();
let affected_table_change = req.get_affected_table_change().cloned().ok();

// validate connection before starting the DDL procedure
if let Some(connection_id) = sink.connection_id {
self.validate_connection(connection_id).await?;
}

let stream_job = match &affected_table_change {
None => StreamingJob::Sink(sink, None),
Some(change) => {
Expand Down Expand Up @@ -739,9 +729,9 @@ impl DdlService for DdlServiceImpl {
}

return match req.payload.unwrap() {
create_connection_request::Payload::PrivateLink(_) => Err(Status::unavailable(
"Private Link is deprecated, please use Cloud Portal",
)),
create_connection_request::Payload::PrivateLink(_) => {
panic!("Private Link Connection has been deprecated")
}
};
}

Expand Down Expand Up @@ -1034,10 +1024,7 @@ impl DdlServiceImpl {
.get_connection_by_id(connection_id as _)
.await?;
if let Some(connection::Info::PrivateLinkService(_)) = &connection.info {
return Err(MetaError::from(MetaErrorInner::Deprecated(
"CREATE CONNECTION to Private Link".to_string(),
"RisingWave Cloud Portal".to_string(),
)));
panic!("Private Link Connection has been deprecated")
}
Ok(())
}
Expand Down

0 comments on commit 8f994e9

Please sign in to comment.