Skip to content

Enable auto purge default catalog property#11749

Merged
findepi merged 1 commit intotrinodb:masterfrom
sravanip09:11575_auto_purge_default
May 5, 2022
Merged

Enable auto purge default catalog property#11749
findepi merged 1 commit intotrinodb:masterfrom
sravanip09:11575_auto_purge_default

Conversation

@sravanip09
Copy link
Copy Markdown
Contributor

Description

This is the continuation of effort done as part of #9457
Enabled hive.managed-table-auto-purge-default optional property at catalog level & will be enforced if auto_purge at table level is not set. This serves as default value for table property auto_purge & removes the
need to set auto_purge each and every time managed table is created. As mentioned in #11575 user is also seeing issue trino:> drop table withacid;
Query failed: The following metastore delete operations failed: drop table with acid
io.trino.spi.TrinoException: The following metastore delete operations failed: drop table withacid
This is happening as auto_purge is not set to true. hive.managed-table-auto-purge-default optional parameter gives flexibility to admin to enforce this at catalog level
there by apply to all the tables that will be created.

Is this change a fix, improvement, new feature, refactoring, or other?

This change is a improvement.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

This is a change to Hive connector

How would you describe this change to a non-technical end user or system administrator?

auto_purge = true allows to skip trash & speed up the dropping managed tables for hive connector. Current implementation requires user to specify the flag during the table creation. With this change
it gives the flexibility to set the auto_purge at catalog level.

Related issues, pull requests, and links

Related Issue: #11575
Related PR: #9457

Documentation

( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
() Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( x) No release notes entries required.
() Release notes entries required with the following suggested text:

@sravanip09
Copy link
Copy Markdown
Contributor Author

Please review @findepi @hashhar @posulliv @ebyhr.
Thank you

Copy link
Copy Markdown
Contributor

@posulliv posulliv left a comment

Choose a reason for hiding this comment

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

This looks good to me. I just had some minor comments. Thanks for working on this!

@hashhar @findepi this change will help a lot with issues we are experiencing where DROP TABLE operations are timing out on the metastore side when dropping tables on S3 storage because it is so inefficient to copy a table to the .Trash folder.

@hashhar hashhar removed their request for review April 20, 2022 06:25
@findepi findepi changed the title 11575: Enable auto purge default catalog property Enable auto purge default catalog property Apr 20, 2022
@sravanip09 sravanip09 force-pushed the 11575_auto_purge_default branch from 42dbce4 to cda38b5 Compare April 22, 2022 00:52
@sravanip09 sravanip09 requested review from electrum and mosabua April 22, 2022 01:36
@sravanip09
Copy link
Copy Markdown
Contributor Author

sravanip09 commented Apr 22, 2022

@posulliv @findepi @mosabua @electrum
Updated the property name & documentation. Would you please review. Thanks

@sravanip09
Copy link
Copy Markdown
Contributor Author

@posulliv @findepi @mosabua @electrum
Addressed the code review comments.Updated the property name & documentation. Would you please review. Thanks.

@sravanip09 sravanip09 force-pushed the 11575_auto_purge_default branch from f4134bc to ebf57fc Compare May 2, 2022 05:40
@sravanip09
Copy link
Copy Markdown
Contributor Author

sravanip09 commented May 2, 2022

Updated the documentation as per the review comments @findepi @mosabua would you please review. Thank you.

@sravanip09
Copy link
Copy Markdown
Contributor Author

@findepi @mosabua would you please review. Thanks

@findepi findepi force-pushed the 11575_auto_purge_default branch from e1de9cb to ec32b6d Compare May 5, 2022 08:20
@findepi
Copy link
Copy Markdown
Member

findepi commented May 5, 2022

(squashed and rebased)

Add config property for the existing `auto_purge` table property.
@findepi findepi force-pushed the 11575_auto_purge_default branch from ec32b6d to ebd116c Compare May 5, 2022 08:23
@findepi findepi merged commit f73fa14 into trinodb:master May 5, 2022
@findepi findepi mentioned this pull request May 5, 2022
@github-actions github-actions bot added this to the 380 milestone May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants