You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "paultanay (via GitHub)" <gi...@apache.org> on 2026/04/21 07:12:45 UTC

[PR] docs: document group deletion task flow [skywalking-banyandb]

paultanay opened a new pull request, #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081

   ## Summary
   
   Document the remaining 0.10 group deletion gap from `#13777`.
   
   This updates `docs/interacting/bydbctl/schema/group.md` to cover:
   - `bydbctl group delete` modes
   - `--force`, `--dry-run`, and `--data-only`
   - the background deletion task lifecycle
   - the task status query endpoint
   - links to the relevant API reference entries
   
   ## Why
   
   Group deletion behavior has changed beyond the original one-line `bydbctl group delete` example.
   
   The current code supports:
   - dry-run previews
   - forced deletion of non-empty groups
   - data-only deletion that preserves metadata
   - background deletion tasks with queryable status
   
   But the user-facing docs were still missing those details.
   
   ## Validation
   
   Validated against the current implementation:
   - `bydbctl/internal/cmd/group.go`
   - `api/proto/banyandb/database/v1/rpc.proto`
   - `banyand/liaison/grpc/registry.go`
   - `banyand/liaison/grpc/deletion.go`
   
   Part of apache/skywalking#13777
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#discussion_r3116179836


##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -70,14 +70,78 @@ You can't change the unit of `segment_interval`. If you want to change the unit,
 
 ## Delete operation
 
-Delete operation deletes a group's schema.
+Delete operation removes a group's data and, unless `--data-only` is set, its associated schema resources. For non-dry-run deletes, BanyanDB creates a background task so the request can return quickly while data files and schema resources are removed in order.
+
+### Delete modes
+
+- Default delete only succeeds when the group is empty.
+- `--force` allows deleting a non-empty group.
+- `--dry-run` previews the schema resources that would be deleted in `schema_info` and does not create a deletion task.

Review Comment:
   The dry-run output field name here is documented as `schema_info`, but the HTTP JSON (and therefore `bydbctl`'s YAML output via JSONToYAML) uses protobuf JSON names, so this will appear as `schemaInfo`. Suggest updating the docs to reference the actual response key users will see (or mention both proto field name and JSON name).
   ```suggestion
   - `--dry-run` previews the schema resources that would be deleted in `schemaInfo` in the HTTP JSON / `bydbctl` YAML output (proto field: `schema_info`) and does not create a deletion task.
   ```



##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -90,4 +154,5 @@ bydbctl group list
 
 ## API Reference
 
-[Group Registration Operations](../../../api-reference.md#groupregistryservice)
+- [Group Registration Operations](../../../api-reference.md#groupregistryservice)

Review Comment:
   The API reference link anchor `#groupregistryservice` appears to be invalid in `docs/api-reference.md` (no matching anchor); the generated anchor for the service section is `#banyandb-database-v1-GroupRegistryService`. As-is, this link will be broken for readers.
   ```suggestion
   - [Group Registration Operations](../../../api-reference.md#banyandb-database-v1-GroupRegistryService)
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "ButterBright (via GitHub)" <gi...@apache.org>.
ButterBright commented on code in PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#discussion_r3117303468


##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -70,14 +70,78 @@ You can't change the unit of `segment_interval`. If you want to change the unit,
 
 ## Delete operation
 
-Delete operation deletes a group's schema.
+Delete operation removes a group's data and, unless `--data-only` is set, its associated schema resources. For non-dry-run deletes, BanyanDB creates a background task so the request can return quickly while data files and schema resources are removed in order.
+
+### Delete modes
+
+- Default delete only succeeds when the group is empty.
+- `--force` allows deleting a non-empty group.
+- `--dry-run` previews the schema resources that would be deleted in `schemaInfo` in the HTTP JSON / `bydbctl` YAML output (proto field: `schema_info`) and does not create a deletion task.
+- `--data-only` removes only the data files and keeps the group metadata and schema resources.
 
 ### Examples of deleting
 
+Delete an empty group:
+
 ```shell
 bydbctl group delete -g sw_metric
 ```
 
+Preview what would be deleted from a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --dry-run
+```
+
+Force delete a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --force
+```
+
+Delete only the data files while keeping the schema:
+
+```shell
+bydbctl group delete -g sw_metric --force --data-only
+```
+
+### Deletion task status
+
+For non-dry-run deletes, BanyanDB creates a background deletion task. The task typically moves through these phases:
+
+- `PHASE_PENDING`: the task is created and waiting to start.
+- `PHASE_IN_PROGRESS`: data files and schema resources are being removed.
+- `PHASE_COMPLETED`: deletion finished successfully.
+- `PHASE_FAILED`: deletion stopped with an error message.
+
+`bydbctl` currently exposes the delete request itself, but not a dedicated subcommand for polling the task status. Because `bydbctl` uses BanyanDB's HTTP endpoints, you can query the task status with any HTTP client:
+
+```shell
+curl http://127.0.0.1:17913/api/v1/group/task/sw_metric
+```
+
+Example response:
+
+```json
+{
+  "task": {
+    "currentPhase": "PHASE_IN_PROGRESS",
+    "totalCounts": {
+      "stream": 1,
+      "index_rule_binding": 1
+    },
+    "deletedCounts": {
+      "index_rule_binding": 1
+    },
+    "totalDataSizeBytes": "1048576",
+    "deletedDataSizeBytes": "524288",
+    "message": "deleting streams"

Review Comment:
   It also includes created_at and updated_at fields.



##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -70,14 +70,78 @@ You can't change the unit of `segment_interval`. If you want to change the unit,
 
 ## Delete operation
 
-Delete operation deletes a group's schema.
+Delete operation removes a group's data and, unless `--data-only` is set, its associated schema resources. For non-dry-run deletes, BanyanDB creates a background task so the request can return quickly while data files and schema resources are removed in order.
+
+### Delete modes
+
+- Default delete only succeeds when the group is empty.
+- `--force` allows deleting a non-empty group.
+- `--dry-run` previews the schema resources that would be deleted in `schemaInfo` in the HTTP JSON / `bydbctl` YAML output (proto field: `schema_info`) and does not create a deletion task.

Review Comment:
   ```suggestion
   - `--dry-run` previews the schema resources that would be deleted and does not create a deletion task.
   ```



##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -70,14 +70,78 @@ You can't change the unit of `segment_interval`. If you want to change the unit,
 
 ## Delete operation
 
-Delete operation deletes a group's schema.
+Delete operation removes a group's data and, unless `--data-only` is set, its associated schema resources. For non-dry-run deletes, BanyanDB creates a background task so the request can return quickly while data files and schema resources are removed in order.
+
+### Delete modes
+
+- Default delete only succeeds when the group is empty.
+- `--force` allows deleting a non-empty group.
+- `--dry-run` previews the schema resources that would be deleted in `schemaInfo` in the HTTP JSON / `bydbctl` YAML output (proto field: `schema_info`) and does not create a deletion task.
+- `--data-only` removes only the data files and keeps the group metadata and schema resources.
 
 ### Examples of deleting
 
+Delete an empty group:
+
 ```shell
 bydbctl group delete -g sw_metric
 ```
 
+Preview what would be deleted from a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --dry-run
+```
+
+Force delete a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --force
+```
+
+Delete only the data files while keeping the schema:
+
+```shell
+bydbctl group delete -g sw_metric --force --data-only
+```
+
+### Deletion task status
+
+For non-dry-run deletes, BanyanDB creates a background deletion task. The task typically moves through these phases:
+
+- `PHASE_PENDING`: the task is created and waiting to start.
+- `PHASE_IN_PROGRESS`: data files and schema resources are being removed.
+- `PHASE_COMPLETED`: deletion finished successfully.
+- `PHASE_FAILED`: deletion stopped with an error message.
+
+`bydbctl` currently exposes the delete request itself, but not a dedicated subcommand for polling the task status. Because `bydbctl` uses BanyanDB's HTTP endpoints, you can query the task status with any HTTP client:

Review Comment:
   This reminds me that we should implement this later on.



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#issuecomment-4289584298

   ## [Codecov](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/1081?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 31.12%. Comparing base ([`3530dd9`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/3530dd9b5cefaa4fef60eec91ecbfbdfcaf243c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6cd12e2`](https://app.codecov.io/gh/apache/skywalking-banyandb/commit/6cd12e23a6c6cd0d35b824ebf71c366bc921b3ab?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 214 commits behind head on main.
   > :exclamation:  There is a different number of reports uploaded between BASE (3530dd9) and HEAD (6cd12e2). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (3530dd9) | HEAD (6cd12e2) |
   >|------|------|------|
   >||1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##             main    #1081       +/-   ##
   ===========================================
   - Coverage   45.97%   31.12%   -14.86%     
   ===========================================
     Files         328      124      -204     
     Lines       55505    12949    -42556     
   ===========================================
   - Hits        25520     4030    -21490     
   + Misses      27909     8532    -19377     
   + Partials     2076      387     -1689     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/1081/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [pkg](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/1081/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `31.12% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/skywalking-banyandb/pull/1081?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "ButterBright (via GitHub)" <gi...@apache.org>.
ButterBright commented on code in PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#discussion_r3117323965


##########
docs/interacting/bydbctl/schema/group.md:
##########
@@ -70,14 +70,78 @@ You can't change the unit of `segment_interval`. If you want to change the unit,
 
 ## Delete operation
 
-Delete operation deletes a group's schema.
+Delete operation removes a group's data and, unless `--data-only` is set, its associated schema resources. For non-dry-run deletes, BanyanDB creates a background task so the request can return quickly while data files and schema resources are removed in order.
+
+### Delete modes
+
+- Default delete only succeeds when the group is empty.
+- `--force` allows deleting a non-empty group.
+- `--dry-run` previews the schema resources that would be deleted in `schemaInfo` in the HTTP JSON / `bydbctl` YAML output (proto field: `schema_info`) and does not create a deletion task.
+- `--data-only` removes only the data files and keeps the group metadata and schema resources.
 
 ### Examples of deleting
 
+Delete an empty group:
+
 ```shell
 bydbctl group delete -g sw_metric
 ```
 
+Preview what would be deleted from a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --dry-run
+```
+
+Force delete a non-empty group:
+
+```shell
+bydbctl group delete -g sw_metric --force
+```
+
+Delete only the data files while keeping the schema:
+
+```shell
+bydbctl group delete -g sw_metric --force --data-only
+```
+
+### Deletion task status
+
+For non-dry-run deletes, BanyanDB creates a background deletion task. The task typically moves through these phases:
+
+- `PHASE_PENDING`: the task is created and waiting to start.
+- `PHASE_IN_PROGRESS`: data files and schema resources are being removed.
+- `PHASE_COMPLETED`: deletion finished successfully.
+- `PHASE_FAILED`: deletion stopped with an error message.
+
+`bydbctl` currently exposes the delete request itself, but not a dedicated subcommand for polling the task status. Because `bydbctl` uses BanyanDB's HTTP endpoints, you can query the task status with any HTTP client:

Review Comment:
   It reminds me that we should implement this later on.



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "paultanay (via GitHub)" <gi...@apache.org>.
paultanay commented on PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#issuecomment-4288755925

   For now I kept the docs aligned with the current HTTP task endpoint behavior, since there isn’t a dedicated `bydbctl` polling subcommand yet.


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081#issuecomment-4287137507

   @ButterBright, would you please take a look?


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: document group deletion task flow [skywalking-banyandb]

Posted by "ButterBright (via GitHub)" <gi...@apache.org>.
ButterBright merged PR #1081:
URL: https://github.com/apache/skywalking-banyandb/pull/1081


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org