Skip to content

[HUDI-6403] Ensure hoodie.properties updated after deleting MDT#9010

Merged
xushiyan merged 3 commits intoapache:masterfrom
xushiyan:HUDI-6403-fix-mdt-delete
Jun 19, 2023
Merged

[HUDI-6403] Ensure hoodie.properties updated after deleting MDT#9010
xushiyan merged 3 commits intoapache:masterfrom
xushiyan:HUDI-6403-fix-mdt-delete

Conversation

@xushiyan
Copy link
Member

@xushiyan xushiyan commented Jun 18, 2023

Change Logs

When deleting metadata table via fs.delete, hoodie.properties may still contain these 2 table configs, which should be removed as these configs are for readers to determine which metadata partitions can be used

  • hoodie.table.metadata.partitions
  • hoodie.table.metadata.partitions.inflight

Made sure applicable scenarios standardize the way to delete MDT via HoodieTableMetadataUtil#deleteMetadataTable

Impact

MDT deletion flow and subsequent read was impacted.

Risk level

Low

Documentation Update

NA

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@xushiyan xushiyan added priority:critical Production degraded; pipelines stalled release-0.14.0 labels Jun 18, 2023
Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

Looks good to me, with a minor comment.

Copy link
Contributor

@zhangyue19921010 zhangyue19921010 left a comment

Choose a reason for hiding this comment

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

Hi @xushiyan, I believe this is a bug in DeleteMetadataTableProcedure which just delete MDT folder.
On the other hand, when user disable MDT, we also try to delete existed MDT, mentioned in

and . Do we also take these into account?

Copy link
Member Author

@xushiyan xushiyan left a comment

Choose a reason for hiding this comment

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

@codope @zhangyue19921010 can you pls take another look? changed to use existing API for this

try {
LOG.info("Deleting metadata table because it is disabled in writer.");
deleteMetadataTable(config.getBasePath(), context);
clearMetadataTablePartitionsConfig(Option.empty(), true);
Copy link
Member Author

Choose a reason for hiding this comment

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

removed this as the properties update is included in deleteMetadataTable()

@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@xushiyan xushiyan merged commit 4cce1ff into apache:master Jun 19, 2023
@xushiyan xushiyan deleted the HUDI-6403-fix-mdt-delete branch June 19, 2023 03:02
@zhangyue19921010
Copy link
Contributor

All looks good to me. Thanks @xushiyan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:critical Production degraded; pipelines stalled release-0.14.0

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants