Skip to content

Commit

Permalink
Add proto
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy committed Jan 14, 2025
1 parent 1e63772 commit 5d790d6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
13 changes: 12 additions & 1 deletion gensrc/proto/internal_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,15 @@ message PStreamLoadResponse {
optional string json_result = 1;
}

message PUpdateTransactionStateRequest {
repeated TransactionStatePB states = 1;
}

// The update result for each transaction state
message PUpdateTransactionStateResponse {
repeated StatusPB results = 1;
}

service PInternalService {
rpc transmit_data(PTransmitDataParams) returns (PTransmitDataResult);
rpc exec_plan_fragment(PExecPlanFragmentRequest) returns (PExecPlanFragmentResult);
Expand Down Expand Up @@ -704,6 +713,8 @@ service PInternalService {
rpc process_dictionary_cache(starrocks.PProcessDictionaryCacheRequest) returns (starrocks.PProcessDictionaryCacheResult);

rpc fetch_arrow_schema(PFetchArrowSchemaRequest) returns (PFetchArrowSchemaResult);

rpc stream_load(PStreamLoadRequest) returns (PStreamLoadResponse);

rpc update_transaction_state(PUpdateTransactionStateRequest) returns (PUpdateTransactionStateResponse);
};
15 changes: 15 additions & 0 deletions gensrc/proto/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,18 @@ message PersistentIndexSstableMetaPB {
// sstables are ordered with the smaller version on the left.
repeated PersistentIndexSstablePB sstables = 1;
}

enum TransactionStatusPB {
TRANS_UNKNOWN = 0;
TRANS_PREPARE = 1;
TRANS_COMMITTED = 2;
TRANS_VISIBLE = 3;
TRANS_ABORTED = 4;
TRANS_PREPARED = 5;
}

message TransactionStatePB {
optional int64 txn_id = 1;
optional TransactionStatusPB status = 2;
optional string reason = 3;
}

0 comments on commit 5d790d6

Please sign in to comment.