Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed Mar 1, 2023
1 parent 313a9ff commit 756d4ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 0 additions & 2 deletions proto/catalog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ message Sink {
string definition = 13;
}


message Connection {
message PrivateLinkService {
string endpoint_id = 1;
Expand All @@ -102,7 +101,6 @@ message Connection {
oneof info {
PrivateLinkService private_link_service = 3;
}

}

message Index {
Expand Down
8 changes: 3 additions & 5 deletions proto/ddl_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ message GetDdlProgressResponse {
repeated DdlProgress ddl_progress = 1;
}


message CreateConnectionRequest {
message PrivateLink {
string provider = 1;
Expand All @@ -256,10 +255,9 @@ message CreateConnectionResponse {
uint64 version = 2;
}

message ListConnectionRequest {
}
message ListConnectionsRequest {}

message ListConnectionResponse {
message ListConnectionsResponse {
repeated catalog.Connection connections = 1;
// global catalog version
uint64 version = 2;
Expand Down Expand Up @@ -289,5 +287,5 @@ service DdlService {
rpc GetTable(GetTableRequest) returns (GetTableResponse);
rpc GetDdlProgress(GetDdlProgressRequest) returns (GetDdlProgressResponse);
rpc CreateConnection(CreateConnectionRequest) returns (CreateConnectionResponse);
rpc ListConnections(ListConnectionRequest) returns (ListConnectionResponse);
rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse);
}
8 changes: 4 additions & 4 deletions src/meta/src/rpc/service/ddl_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,10 @@ where

async fn list_connections(
&self,
_request: Request<ListConnectionRequest>,
) -> Result<Response<ListConnectionResponse>, Status> {
_request: Request<ListConnectionsRequest>,
) -> Result<Response<ListConnectionsResponse>, Status> {
let conns = self.catalog_manager.list_connections().await;
Ok(Response::new(ListConnectionResponse {
Ok(Response::new(ListConnectionsResponse {
connections: conns,
version: 0,
}))
Expand Down Expand Up @@ -666,7 +666,7 @@ where

// store the rewrite rules in properties
if is_kafka_source(properties) && !dns_entries.is_empty() {
let broker_key = kafka_props_broker_key(&properties);
let broker_key = kafka_props_broker_key(properties);
let servers = properties
.get(broker_key)
.cloned()
Expand Down
4 changes: 2 additions & 2 deletions src/rpc_client/src/meta_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl MetaClient {
}

pub async fn list_connections(&self, _name: Option<&str>) -> Result<Vec<Connection>> {
let request = ListConnectionRequest {};
let request = ListConnectionsRequest {};
let resp = self.inner.list_connections(request).await?;
Ok(resp.connections)
}
Expand Down Expand Up @@ -1378,7 +1378,7 @@ macro_rules! for_all_meta_rpc {
,{ ddl_client, risectl_list_state_tables, RisectlListStateTablesRequest, RisectlListStateTablesResponse }
,{ ddl_client, get_ddl_progress, GetDdlProgressRequest, GetDdlProgressResponse }
,{ ddl_client, create_connection, CreateConnectionRequest, CreateConnectionResponse }
,{ ddl_client, list_connections, ListConnectionRequest, ListConnectionResponse }
,{ ddl_client, list_connections, ListConnectionsRequest, ListConnectionsResponse }
,{ hummock_client, unpin_version_before, UnpinVersionBeforeRequest, UnpinVersionBeforeResponse }
,{ hummock_client, get_current_version, GetCurrentVersionRequest, GetCurrentVersionResponse }
,{ hummock_client, replay_version_delta, ReplayVersionDeltaRequest, ReplayVersionDeltaResponse }
Expand Down

0 comments on commit 756d4ea

Please sign in to comment.