Skip to content
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

[HUDI-8518] Fix secondary index updates for event_time and custom merge modes #12507

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

codope
Copy link
Member

@codope codope commented Dec 17, 2024

Change Logs

Fix secondary index updates for event_time and custom merge modes:

  • Use metadata-based filesystem view to get the latest file slices in a partition
  • Get all the log files for file id touched in the given commit
  • Generate SI using the above log files and configured record merger
  • Add tests for event_time_ordering and custom merge modes

Impact

Fix secondary index updates for event_time and custom merge modes.

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

low

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

@codope codope requested a review from nsivabalan December 17, 2024 12:35
@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Dec 17, 2024
@@ -2228,9 +2229,17 @@ public static HoodieData<HoodieRecord> readSecondaryKeysFromBaseFiles(HoodieEngi
engineContext.setJobStatus(activeModule, "Secondary Index: reading secondary keys from " + partitionFiles.size() + " partitions");
return engineContext.parallelize(partitionFiles, parallelism).flatMap(partitionWithBaseAndLogFiles -> {
final String partition = partitionWithBaseAndLogFiles.getKey();
// get the log files for the partition and group them by fileId
Map<String, List<HoodieLogFile>> logFilesByFileId = getPartitionLatestFileSlicesIncludingInflight(metaClient, Option.of(fsView), partition).stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

typically our FSV may not have inflight files. So, how do we know we are getting the inflights here? can you throw some light please

Copy link
Contributor

Choose a reason for hiding this comment

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

actually lets sync up on this. I have a slightly diff approach to make this more optimized.

@codope codope force-pushed the hudi-8518-si-merge-modes branch from 09b8d94 to 768a83c Compare December 19, 2024 06:19
@hudi-bot
Copy link

CI report:

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

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.

3 participants