hanahmily commented on code in PR #913:
URL:
https://github.com/apache/skywalking-banyandb/pull/913#discussion_r2641682308
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
Review Comment:
The deletion process is asynchronous. What is the difference between forced
and graceful deletion?
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
}
message GroupRegistryServiceDeleteResponse {
bool deleted = 1;
+ string task_id = 2;
+}
+
+message GroupDeletionProgress {
+ enum Phase {
+ PHASE_UNSPECIFIED = 0;
+ PHASE_PENDING = 1;
+ PHASE_IN_PROGRESS = 2;
+ PHASE_COMPLETED = 3;
+ PHASE_FAILED = 4;
+ }
+ Phase current_phase = 1;
+ int32 stream_count = 2;
+ int32 measure_count = 3;
+ int32 trace_count = 4;
+ int64 data_size_bytes = 5;
+ string message = 6;
Review Comment:
Does the comment make sense?
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
}
message GroupRegistryServiceDeleteResponse {
bool deleted = 1;
+ string task_id = 2;
+}
+
+message GroupDeletionProgress {
+ enum Phase {
+ PHASE_UNSPECIFIED = 0;
+ PHASE_PENDING = 1;
+ PHASE_IN_PROGRESS = 2;
+ PHASE_COMPLETED = 3;
+ PHASE_FAILED = 4;
+ }
+ Phase current_phase = 1;
+ int32 stream_count = 2;
+ int32 measure_count = 3;
+ int32 trace_count = 4;
Review Comment:
How to present other resources: indexRule, indexRuleBinding,
topnAggregation, and etc?
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
}
message GroupRegistryServiceDeleteResponse {
bool deleted = 1;
+ string task_id = 2;
+}
+
+message GroupDeletionProgress {
+ enum Phase {
+ PHASE_UNSPECIFIED = 0;
+ PHASE_PENDING = 1;
+ PHASE_IN_PROGRESS = 2;
+ PHASE_COMPLETED = 3;
+ PHASE_FAILED = 4;
+ }
+ Phase current_phase = 1;
+ int32 stream_count = 2;
+ int32 measure_count = 3;
+ int32 trace_count = 4;
+ int64 data_size_bytes = 5;
+ string message = 6;
+ bool is_dry_run = 7;
+ int64 deleted_data_bytes = 8;
Review Comment:
What's the relationship with data_size_bytes
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
Review Comment:
Consider adding a "list group contents" API for inspection before deletion.
1. Display all schemas within the groups. Stream, Measure, Trace, Property,
IndexRule, IndexRuleBinding, TopNAggregation and etc.
2. Provide data allocations, including segment and shard information for
each data node. This should include details such as the index, data count, and
size in bytes, as well as the types of indexes: series index, inverted index,
and secondary index.
3. Include a liaison for syncing queues, similar to data allocation, and
trace the model to show the handoff queue.
4. Present information on different lifecycle data nodes.
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
}
message GroupRegistryServiceDeleteResponse {
bool deleted = 1;
+ string task_id = 2;
+}
+
+message GroupDeletionProgress {
+ enum Phase {
+ PHASE_UNSPECIFIED = 0;
+ PHASE_PENDING = 1;
+ PHASE_IN_PROGRESS = 2;
+ PHASE_COMPLETED = 3;
+ PHASE_FAILED = 4;
+ }
+ Phase current_phase = 1;
+ int32 stream_count = 2;
+ int32 measure_count = 3;
+ int32 trace_count = 4;
Review Comment:
Lack of the property data module. Or you can use a "map" instead of
dedicated fields.
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
+ bool force = 3;
}
message GroupRegistryServiceDeleteResponse {
bool deleted = 1;
+ string task_id = 2;
+}
+
+message GroupDeletionProgress {
+ enum Phase {
+ PHASE_UNSPECIFIED = 0;
+ PHASE_PENDING = 1;
+ PHASE_IN_PROGRESS = 2;
+ PHASE_COMPLETED = 3;
+ PHASE_FAILED = 4;
+ }
+ Phase current_phase = 1;
+ int32 stream_count = 2;
+ int32 measure_count = 3;
+ int32 trace_count = 4;
+ int64 data_size_bytes = 5;
+ string message = 6;
+ bool is_dry_run = 7;
+ int64 deleted_data_bytes = 8;
+ string error_message = 9;
+}
+
+message GroupDeletionTask {
+ string task_id = 1;
+ string group_name = 2;
+ GroupDeletionProgress progress = 3;
+ google.protobuf.Timestamp created_at = 4;
+}
+
+message GroupDeletionTaskGetRequest {
+ string task_id = 1;
+}
+
+message GroupDeletionTaskGetResponse {
+ GroupDeletionTask task = 1;
+}
+
+message GroupDeletionTaskListRequest {
+ string group_name = 1;
Review Comment:
Would you support multiple deletion tasks for a single group? How do they
work together?
##########
api/proto/banyandb/database/v1/rpc.proto:
##########
@@ -354,10 +355,56 @@ message GroupRegistryServiceUpdateResponse {}
message GroupRegistryServiceDeleteRequest {
string group = 1;
+ bool dry_run = 2;
Review Comment:
Add documents, which help us review the new API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]