forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KUDU-3344: catalog manager clean up metadata for deleted tables/tablets
Kudu masters now retain metadata for deleted tables and tablets forever, and the leader master loads all of them into memory when starts. If we have a lot of tables and tablets in a cluster, memory usage of the leader master will be large and it will take a long time to start the leader master. Consider that in many cases users drop tables and partitions, useless metadata should be cleaned up in backgroud tasks. But it's hard to decide when we should clean them up, because the deletion of tablet replicas is asynchronous. If metadata is deleted before the tablet data is deleted, the unknown tablet reported by a tablet server will not be processed by catalog manager and we must delete it manually. So this patch add a new flag 'deleted_table_and_tablet_reserved_secs', its default value is the same as 'unresponsive_ts_rpc_timeout_ms', we can roughly assume that after this amount of time the tablet data will be actually deleted and it's safe to delete its metadata entry from sys.catalog table and in-memory map. Change-Id: Idefa2ee2f5108ba913fe0057a4061c3c28351547 Reviewed-on: http://gerrit.cloudera.org:8080/18152 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Alexey Serbin <[email protected]>
- Loading branch information
1 parent
7db93eb
commit 2de290d
Showing
8 changed files
with
267 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.