Skip to content

Conversation

@wxplovecc
Copy link
Contributor

Tips

What is the purpose of the pull request

Currently when rollback a compact action it just revert the request instant to inflight

But in CompactionCommitSink it keep the preview compact event when rollback

It will cause commit too fast before all next real compact events come and use wrong fileId

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

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.

@wxplovecc
Copy link
Contributor Author

cc @danny0405

reset(instant);
return;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we ensure the buffer was cleared like this:

try {
  // handle failure case
  CompactionUtil.rollbackCompaction(table, instant);
} finally {
  // remove commitBuffer to avoid obsolete metadata commit
  reset(instant);
  return;
}

@danny0405
Copy link
Contributor

Thanks for the contribution @wxplovecc , i have left some minor comments.

@danny0405 danny0405 self-assigned this Apr 20, 2022
@wxplovecc
Copy link
Contributor Author

Thanks for the contribution @wxplovecc , i have left some minor comments.

done

Copy link
Contributor

@danny0405 danny0405 left a comment

Choose a reason for hiding this comment

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

+1

@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

@danny0405 danny0405 merged commit 408663c into apache:master Apr 20, 2022
xushiyan pushed a commit that referenced this pull request Apr 20, 2022
* stop add event when has failed compact event

Co-authored-by: wxp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants