You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/09/22 17:32:00 UTC

[jira] [Commented] (KUDU-3326) Add Soft Delete Table Supports

    [ https://issues.apache.org/jira/browse/KUDU-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608363#comment-17608363 ] 

ASF subversion and git services commented on KUDU-3326:
-------------------------------------------------------

Commit 89e1ee3202b47e0f0e247ae7beb91ac344a012a6 in kudu's branch refs/heads/master from kedeng
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=89e1ee320 ]

KUDU-3326 [master] add flag FLAGS_deleted_table_reserve_seconds to change the cluster-wide
behavior of the DeleteTable() RPC.

This patch helps to change the default behavior of the DeleteTable RPC at the master side.
Value 0 means DeleteTable() works the regular way, i.e. dropping the table and purging its
data immediately. If it's set to anything greater than 0, then all DeleteTable() RPCs are
turned into SoftDeleteTable(..., FLAGS_deleted_table_reserve_seconds)").

NOTE: this flag is useless if HMS is enabled.

Change-Id: I7cf3021fa0e9a425d5f8091ea3336c55a3c14bbc
Reviewed-on: http://gerrit.cloudera.org:8080/18864
Tested-by: Kudu Jenkins
Reviewed-by: Yingchun Lai <ac...@gmail.com>
Reviewed-by: Alexey Serbin <al...@apache.org>


> Add Soft Delete Table Supports
> ------------------------------
>
>                 Key: KUDU-3326
>                 URL: https://issues.apache.org/jira/browse/KUDU-3326
>             Project: Kudu
>          Issue Type: New Feature
>          Components: api, CLI, client, master, test
>            Reporter: dengke
>            Assignee: dengke
>            Priority: Major
>
> h2. Brief description:
>         Soft delete means that the kudu system will not delete the table immediately after receiving the command to delete the table. Instead, it will mark the table and set a validity period. After the validity period, will try again to determine whether the table really needs to be deleted.
>          This feature can restore data conveniently and timely in the case of accidental deletion.
> h2. Relevant modification points:
> 1. After deleting a table, the original table name will be renamed as KUDU_TRASHED: < timestamp >: < original table name >, which becomes a trash table.
>  2. The contents of the trash table are exactly the same as those of the original table.   Although it cannot be renamed, added or deleted directly, it can be read and written normally. The trash table will be retained for a period of time by default (such as 7 days, which can be modified through parameters). The compact priority of the trash table will be set to the lowest to save the system resources.
>  3. The master needs to add a thread to process expired trash tables and perform real deletion.
>  4. It is allowed to create a table with the same name as the original table, and the newly created table with the same name can be deleted normally.
>  5. It is allowed to recall deleted tables, but the following two situations cannot be recalled: the same original table name exists and the trash table has expired.
> 6. The KUDU_TRASHED is a reserved string for the system. Users are not allowed to create a table with table names starting with KUDU_TRASHED.
>  7. Kudu tool adaptation soft deletion.
>  8. Java API adaptation soft deletion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)