Skip to content

feat: add dropped table ddl tasks#318

Open
v0y4g3r wants to merge 3 commits intomainfrom
feat/soft-drop-table-ddl-tasks
Open

feat: add dropped table ddl tasks#318
v0y4g3r wants to merge 3 commits intomainfrom
feat/soft-drop-table-ddl-tasks

Conversation

@v0y4g3r
Copy link
Copy Markdown
Contributor

@v0y4g3r v0y4g3r commented May 2, 2026

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This PR extends the metasrv protobuf DDL task API for dropped-table lifecycle operations.

  • Adds UndropTableTask to greptime.v1.meta.DdlTaskRequest with direct catalog_name, schema_name, table_name, and required table_id fields.
  • Adds PurgeDroppedTableTask to greptime.v1.meta.DdlTaskRequest with direct catalog_name, schema_name, table_name, and optional table_id fields.
  • Extends DdlTaskRequest.task with undrop_table_task tag 19 and purge_dropped_table_task tag 20.
  • Regenerates Rust, Go, Java, and C++ bindings plus the checked-in descriptor blob.

Compatibility notes:

  • Existing tags and message fields are not renumbered or removed.
  • The new oneof variants use previously unused tags 19 and 20.
  • These are metasrv procedure-submission tasks, so the fields are kept directly on the task messages instead of adding client-facing greptime.v1.DdlRequest expressions.

Checklist

  • I have written the necessary comments.
  • I have added the necessary unit tests and integration tests.

@v0y4g3r v0y4g3r force-pushed the feat/soft-drop-table-ddl-tasks branch from 305abc0 to 3ceef25 Compare May 3, 2026 08:06
@v0y4g3r v0y4g3r marked this pull request as ready for review May 6, 2026 02:41
Copilot AI review requested due to automatic review settings May 6, 2026 02:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the greptime.v1.meta.DdlTaskRequest protobuf API with two new DDL task variants to support workflows around dropped tables (restoring a dropped table and purging dropped-table metadata/data), and regenerates the Rust/Java/C++ bindings accordingly.

Changes:

  • Add UndropTableTask and PurgeDroppedTableTask message types to proto/greptime/v1/meta/ddl.proto.
  • Extend DdlTaskRequest.task oneof with undrop_table_task (tag 19) and purge_dropped_table_task (tag 20).
  • Regenerate Rust (prost), Java, and C++ protobuf outputs to include the new message types and oneof variants.

Reviewed changes

Copilot reviewed 3 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
proto/greptime/v1/meta/ddl.proto Defines the new task messages and wires them into DdlTaskRequest’s oneof.
src/generated/greptime.v1.meta.rs Updates Rust generated structs and oneof enum to include the new tasks.
java/src/main/java/greptime/v1/meta/Ddl.java Updates Java generated protobuf classes for the new messages/oneof cases.
c++/greptime/v1/meta/ddl.pb.h Updates C++ generated headers for new message types and oneof accessors.
c++/greptime/v1/meta/ddl.pb.cc Updates C++ generated implementation (descriptors, parsing/serialization, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proto/greptime/v1/meta/ddl.proto
Comment thread proto/greptime/v1/meta/ddl.proto
Comment thread proto/greptime/v1/meta/ddl.proto
v0y4g3r added 2 commits May 6, 2026 21:34
Add shared DDL expression messages for undrop and purge dropped table operations so meta DDL tasks follow the existing task wrapper pattern across generated bindings.

Files:

- `proto/greptime/v1/ddl.proto`

- `proto/greptime/v1/meta/ddl.proto`

- generated bindings

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
Restore direct catalog/schema/table fields on dropped table meta DDL tasks instead of wrapping shared DDL expressions.

Files:

- `proto/greptime/v1/ddl.proto`

- `proto/greptime/v1/meta/ddl.proto`

- generated bindings

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants