Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
import com.alibaba.fluss.rpc.messages.MetadataResponse;
import com.alibaba.fluss.rpc.messages.TableExistsRequest;
import com.alibaba.fluss.rpc.messages.TableExistsResponse;
import com.alibaba.fluss.rpc.messages.UpdateMetadataRequest;
import com.alibaba.fluss.rpc.messages.UpdateMetadataResponse;
import com.alibaba.fluss.rpc.protocol.ApiKeys;
import com.alibaba.fluss.rpc.protocol.RPC;

Expand Down Expand Up @@ -129,15 +127,6 @@ public interface AdminReadOnlyGateway extends RpcGateway {
@RPC(api = ApiKeys.GET_METADATA)
CompletableFuture<MetadataResponse> metadata(MetadataRequest request);

/**
* request send to tablet server to update the metadata cache for every tablet server node,
* asynchronously.
*
* @return the update metadata response
*/
@RPC(api = ApiKeys.UPDATE_METADATA)
CompletableFuture<UpdateMetadataResponse> updateMetadata(UpdateMetadataRequest request);

/**
* Get the latest kv snapshots of a primary key table. A kv snapshot is a snapshot of a kv
* tablet, so a table can have multiple kv snapshots.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import com.alibaba.fluss.rpc.messages.PutKvResponse;
import com.alibaba.fluss.rpc.messages.StopReplicaRequest;
import com.alibaba.fluss.rpc.messages.StopReplicaResponse;
import com.alibaba.fluss.rpc.messages.UpdateMetadataRequest;
import com.alibaba.fluss.rpc.messages.UpdateMetadataResponse;
import com.alibaba.fluss.rpc.protocol.ApiKeys;
import com.alibaba.fluss.rpc.protocol.RPC;

Expand All @@ -60,6 +62,15 @@ public interface TabletServerGateway extends RpcGateway, AdminReadOnlyGateway {
CompletableFuture<NotifyLeaderAndIsrResponse> notifyLeaderAndIsr(
NotifyLeaderAndIsrRequest notifyLeaderAndIsrRequest);

/**
* request send to tablet server to update the metadata cache for every tablet server node,
* asynchronously.
*
* @return the update metadata response
*/
@RPC(api = ApiKeys.UPDATE_METADATA)
CompletableFuture<UpdateMetadataResponse> updateMetadata(UpdateMetadataRequest request);

/**
* Stop replica.
*
Expand Down
6 changes: 6 additions & 0 deletions fluss-rpc/src/main/proto/FlussApi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ message UpdateMetadataRequest {
optional PbServerNode coordinator_server = 1;
repeated PbServerNode tablet_servers = 2;
repeated PbTableMetadata table_metadata = 3;
repeated PbPartitionMetadata partition_metadata = 4;
optional int32 coordinator_epoch = 5;
}

message UpdateMetadataResponse {
Expand Down Expand Up @@ -565,6 +567,9 @@ message PbTableMetadata {
repeated PbBucketMetadata bucket_metadata = 5;
required int64 created_time = 6;
required int64 modified_time = 7;

// TODO add a new filed 'deleted_table' to indicate this table is deleted in UpdateMetadataRequest.
// trace by: https://github.com/alibaba/fluss/issues/981
}

message PbPartitionMetadata {
Expand All @@ -581,6 +586,7 @@ message PbBucketMetadata {
optional int32 leader_id = 2;
repeated int32 replica_id = 3 [packed = true];
// TODO: Add isr here.
optional int32 leader_epoch = 4;
}

message PbProduceLogReqForBucket {
Expand Down
Loading