feat: add extension field to region response (#138)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2024-03-15 15:47:06 +08:00
committed by GitHub
parent 96f1f0404f
commit 349cb38558
4 changed files with 763 additions and 207 deletions
+6 -4
View File
@@ -27,7 +27,8 @@ import "greptime/v1/ddl.proto";
service Region { rpc Handle(RegionRequest) returns (RegionResponse); }
message RegionRequestHeader {
// Encoded trace_id & span_id, follow the w3c Trace Context https://www.w3.org/TR/trace-context/#header-name
// Encoded trace_id & span_id, follow the w3c Trace Context
// https://www.w3.org/TR/trace-context/#header-name
map<string, string> tracing_context = 5;
// DB Name of request, tracking only
string dbname = 3;
@@ -56,6 +57,7 @@ message RegionRequest {
message RegionResponse {
ResponseHeader header = 1;
uint64 affected_rows = 2;
map<string, bytes> extension = 3;
}
message InsertRequests { repeated InsertRequest requests = 1; }
@@ -79,9 +81,9 @@ message QueryRequest {
bytes plan = 3;
}
// Create a batch of regions at once, usually used to create multiple logical regions
// at once. Different engines can choose whether to support this request.
// Metric Engine needs it.
// Create a batch of regions at once, usually used to create multiple logical
// regions at once. Different engines can choose whether to support this
// request. Metric Engine needs it.
message CreateRequests { repeated CreateRequest requests = 1; }
message CreateRequest {