From 89c9dc6695cf6d76668a93d943e2380fbd2c91cb Mon Sep 17 00:00:00 2001 From: Yoshiaki Nishimura Date: Thu, 17 Oct 2024 11:20:47 +0900 Subject: [PATCH] Copy proto files from tsubakuro --- src/tateyama/proto/kvs/request.proto | 31 ++++++++++++----------- src/tateyama/proto/kvs/response.proto | 36 +++++++++++++-------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/tateyama/proto/kvs/request.proto b/src/tateyama/proto/kvs/request.proto index 7b258aa5e..f05ff8216 100644 --- a/src/tateyama/proto/kvs/request.proto +++ b/src/tateyama/proto/kvs/request.proto @@ -11,9 +11,12 @@ import "tateyama/proto/kvs/data.proto"; // request message for RPC. message Request { - // the request message version. - uint64 message_version = 1; - reserved 2 to 10; + // service message version (major) + uint64 service_message_version_major = 1; + + // service message version (minor) + uint64 service_message_version_minor = 2; + reserved 3 to 10; reserved 15 to 20; reserved 25 to 30; reserved 32 to 40; @@ -44,10 +47,10 @@ message Request { // batch command. Batch batch = 31; - - // GetErrorInfo command. + + // GetErrorInfo command. GetErrorInfo get_error_info = 41; - + // DisposeTransaction command. DisposeTransaction dispose_transaction = 42; } @@ -58,7 +61,7 @@ message Index { // the index specifier. oneof specifier { - + // the target table name. string table_name = 1; } @@ -139,13 +142,13 @@ message Put { // = OVERWRITE (default behavior). PUT_TYPE_UNSPECIFIED = 0; - + // Puts a table entry in any case. OVERWRITE = 1; - + // Puts a table entry only if it is absent. IF_ABSENT = 2; - + // Puts a table entry only if it is already exists. IF_PRESENT = 3; } @@ -170,10 +173,10 @@ message Remove { // = COUNTING (default behavior). REMOVE_TYPE_UNSPECIFIED = 0; - + // Remove table entries with counting the actually removed entries. COUNTING = 1; - + // Remove table entries without counting the actually removed entries. INSTANT = 2; } @@ -223,10 +226,10 @@ message Scan { // = FORWARD (default behavior). SCAN_TYPE_UNSPECIFIED = 0; - + // Scans over the table from head to tail. FORWARD = 1; - + // Scans over the table from tail to head. BACKWARD = 2; } diff --git a/src/tateyama/proto/kvs/response.proto b/src/tateyama/proto/kvs/response.proto index 4dfd541ef..40842d0ae 100644 --- a/src/tateyama/proto/kvs/response.proto +++ b/src/tateyama/proto/kvs/response.proto @@ -20,9 +20,7 @@ message Error { // response message for RPC. message Response { - // the response message version. - uint64 message_version = 1; - reserved 2 to 10; + reserved 1 to 10; reserved 15 to 20; reserved 25 to 30; reserved 32 to 40; @@ -53,10 +51,10 @@ message Response { // batch command. Batch batch = 31; - - // GetErrorInfo command. + + // GetErrorInfo command. GetErrorInfo get_error_info = 41; - + // DisposeTransaction command. DisposeTransaction dispose_transaction = 42; } @@ -71,7 +69,7 @@ message Begin { // the target transaction handle. transaction.Handle transaction_handle = 1; } - + // the response body. oneof result { // request is successfully completed. @@ -119,7 +117,7 @@ message Get { // the record. repeated data.Record records = 1; } - + // the response body. oneof result { // request is successfully completed. @@ -136,10 +134,10 @@ message Put { // request is successfully completed. message Success { - // the number of records which the operation actually written + // the number of records which the operation actually written sint32 written = 1; } - + // the response body. oneof result { // request is successfully completed. @@ -156,10 +154,10 @@ message Remove { // request is successfully completed. message Success { - // the number of records which the operation actually removed + // the number of records which the operation actually removed sint32 removed = 1; } - + // the response body. oneof result { // request is successfully completed. @@ -176,19 +174,19 @@ message Batch { message Opresult { oneof opresult { - // result of begin + // result of begin Begin begin = 21; - // result of commit + // result of commit Commit commit = 22; - // result of put + // result of put Put put = 23; - // result of get + // result of get Get get = 24; - // result of remove + // result of remove Remove remove = 25; } } @@ -197,7 +195,7 @@ message Batch { message Success { repeated Opresult results = 1; } - + // the response body. oneof result { // request is successfully completed. @@ -229,7 +227,7 @@ message GetErrorInfo { // engine error occurred while the retrieving existing error information. Error error = 13; - } + } } // DisposeTransaction operation