Skip to content

[HUDI-9258] Disable partial update when global index is used #13086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 4, 2025

Conversation

linliu-code
Copy link
Contributor

Change Logs

Currently partial update does not function correctly when global index is used.
Since we are going to use FG reader to replace these adhoc merge logic soon, we disable partial update when global index is enabled.

Impact

No partial update when global index is used.

Risk level (write none, low medium or high below)

None, since this is the current behavior; we just enforce it.

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

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

@github-actions github-actions bot added the size:L PR with lines of changes in (300, 1000] label Apr 3, 2025
@linliu-code linliu-code force-pushed the disable_partial_update branch from 8372a11 to eced87d Compare April 3, 2025 23:17
@github-actions github-actions bot added size:M PR with lines of changes in (100, 300] and removed size:L PR with lines of changes in (300, 1000] labels Apr 3, 2025
@linliu-code linliu-code force-pushed the disable_partial_update branch from eced87d to 449340f Compare April 3, 2025 23:59
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.

Left one comment. Let's also file a followup doc ticket to update the limitation here. - https://hudi.apache.org/docs/sql_dml/#merge-into-partial-update. Could you please fix checkstyle and CI failures?

// Check if goal index is enabled for specific indexes.
def isGlobalIndexEnabled(indexType: String, parameters: Map[String, String]): Boolean = {
Seq(
HoodieIndex.IndexType.GLOBAL_SIMPLE -> HoodieIndexConfig.SIMPLE_INDEX_UPDATE_PARTITION_PATH_ENABLE,
Copy link
Member

Choose a reason for hiding this comment

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

I get the intention that when update partition path is false, only then disable merge into partial update. But, would it be safer to take more conservative approach right now i.e. disable only when global index is enabled irrespective of partition path is true or not? Anyway, update partition path is true by default for global index right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, for Global_simple, the update partition path is enabled by default.

@linliu-code linliu-code force-pushed the disable_partial_update branch from 76b7513 to 3328bc9 Compare April 4, 2025 05:55
@codope codope force-pushed the disable_partial_update branch from 3328bc9 to d8dd679 Compare April 4, 2025 11:38
@hudi-bot
Copy link

hudi-bot commented Apr 4, 2025

CI report:

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

@linliu-code linliu-code marked this pull request as ready for review April 4, 2025 14:21
@codope codope merged commit 2e5ccb4 into apache:master Apr 4, 2025
60 checks passed
voonhous pushed a commit to voonhous/hudi that referenced this pull request Apr 8, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
(cherry picked from commit 2e5ccb4)
voonhous pushed a commit to voonhous/hudi that referenced this pull request Apr 9, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
(cherry picked from commit 2e5ccb4)
voonhous pushed a commit to voonhous/hudi that referenced this pull request Apr 11, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
(cherry picked from commit 2e5ccb4)
voonhous pushed a commit to voonhous/hudi that referenced this pull request Apr 15, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
(cherry picked from commit 2e5ccb4)
voonhous pushed a commit to voonhous/hudi that referenced this pull request Apr 16, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
(cherry picked from commit 2e5ccb4)
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Apr 28, 2025
…13086)

* Disable global index for merge into query

* Fix import styles

* Add flag and test

* Fix schema usage

* Fix compilation

* remove custom merge mode validation

---------

Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Sagar Sumit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M PR with lines of changes in (100, 300]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants