Skip to content

[HUDI-2947] Fixing checkpoint fetch in deltastreamer#4485

Merged
codope merged 2 commits intoapache:masterfrom
nsivabalan:deltaStreamerCheckpointFix
Jan 7, 2022
Merged

[HUDI-2947] Fixing checkpoint fetch in deltastreamer#4485
codope merged 2 commits intoapache:masterfrom
nsivabalan:deltaStreamerCheckpointFix

Conversation

@nsivabalan
Copy link
Copy Markdown
Contributor

@nsivabalan nsivabalan commented Dec 31, 2021

What is the purpose of the pull request

Some operations in hudi may not add CHECKPOINT_KEY and CHECKPOINT_RESET_KEY like incline clustering, cleaning etc. So, deltastreamer should ignore those and go back to find the valid commit metadata from which hudi can fetch the checkpoint info.
Actual issue reported: User starts deltastreamer in continuous mode w/ inline clustering and provides a checkpoint to start with. After few commits shutsdown the job. And then restarts. Lets say incidentally last commit was replace commit (clustering). So, when deltastreamer starts, it checks for CHECKPOINT_KEY and last commit metadata which will not be present in replace commit and hence starts resuming from user provided checkpoint which should not happen.
With the fix in this patch, we go back to find the right commit metadata which has the CHECKPOINT_KEY or CHECKPOINT_RESET key and uses that to determine whether to go with checkpoint from this commit or to go with user provided one.

Brief change log

  • Fixed the way Deltastreamer fetches checkpoint info from commits. Goes back to find the right commit metadata.

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@nsivabalan nsivabalan added the priority:critical Production degraded; pipelines stalled label Jan 3, 2022
Copy link
Copy Markdown
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.

Few minor comments.

@nsivabalan
Copy link
Copy Markdown
Contributor Author

@codope : addressed all comments

@hudi-bot
Copy link
Copy Markdown
Collaborator

hudi-bot commented Jan 7, 2022

CI report:

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

@codope codope merged commit 2e561de into apache:master Jan 7, 2022
nsivabalan added a commit that referenced this pull request Jan 10, 2022
* Fixing checkpoint fetch in detlastreamer

* Addressing comments
@xushiyan xushiyan added priority:critical Production degraded; pipelines stalled priority:high Significant impact; potential bugs and removed priority:critical Production degraded; pipelines stalled labels Jan 11, 2022
@pratyakshsharma pratyakshsharma changed the title [HUDI-2947] Fixing checkpoint fetch in detlastreamer [HUDI-2947] Fixing checkpoint fetch in deltastreamer Jan 11, 2022
@vinishjail97 vinishjail97 mentioned this pull request Jan 24, 2022
5 tasks
vingov pushed a commit to vingov/hudi that referenced this pull request Jan 26, 2022
* Fixing checkpoint fetch in detlastreamer

* Addressing comments
liusenhua pushed a commit to liusenhua/hudi that referenced this pull request Mar 1, 2022
* Fixing checkpoint fetch in detlastreamer

* Addressing comments
vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
* Fixing checkpoint fetch in detlastreamer

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

Labels

priority:high Significant impact; potential bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants