Skip to content

Conversation

@prashantwason
Copy link
Member

What is the purpose of the pull request

Fixed duplicate cleans which lead to issues with metadata table.

Brief change log

Perform unfinished clean operations before attempting to generate a new clean plan.
Refresh fsview after each unfinished clean operation.

Verify this pull request

Added unit test TestHoodieBackedMetadata::testMultiClean

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.

@prashantwason prashantwason requested review from bvaradar, nsivabalan and vinothchandar and removed request for bvaradar December 4, 2021 00:58
@prashantwason prashantwason force-pushed the pw_fix_multi_clean_OSS branch from 951d3b4 to c75df82 Compare December 4, 2021 01:00
@nsivabalan nsivabalan self-assigned this Dec 22, 2021
@nsivabalan nsivabalan added the priority:critical Production degraded; pipelines stalled label Jan 4, 2022
@nsivabalan
Copy link
Contributor

Hey @prashantwason : Can you respond to our comments above. Looking to get his into 0.10.1. would appreciate if you can respond. we can see how to proceed and get this in.

@prashantwason
Copy link
Member Author

Responded to the comment above. Are there specific objections to the way this patch is implemented or the issue itself? I am open to any way to fix this issue.

@nsivabalan nsivabalan added priority:high Significant impact; potential bugs and removed priority:critical Production degraded; pipelines stalled labels Jan 10, 2022
@nsivabalan
Copy link
Contributor

Since we don't have a clear/concrete plan yet, I am removing it from 0.10.1. but lets brainstorm and try to get a closure.

@nsivabalan
Copy link
Contributor

@prashantwason : We are looking to get this in for 0.11. Would appreciate if you can follow up on this and let us know once its ready to review again.

@nsivabalan nsivabalan added the priority:critical Production degraded; pipelines stalled label Feb 8, 2022
@prashantwason
Copy link
Member Author

@nsivabalan Your plan to not schedule clean when another is in progress works. Can you please make that change and I can close this PR? Happy to review the other PR too.

@nsivabalan nsivabalan force-pushed the pw_fix_multi_clean_OSS branch 2 times, most recently from a14bc80 to 98c3c09 Compare February 10, 2022 01:33
}
LOG.info("Cleaner started");
final Timer.Context timerContext = metrics.getCleanCtx();
LOG.info("Cleaned failed attempts if any");
Copy link
Member Author

Choose a reason for hiding this comment

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

This log is not very useful and prints each time. Probably move it to within rollbackFailedWrites() if any writes are actually found to be cleaned.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have moved it to CleanerUtils.rollbackFailedWrites().
rollbackFailedwrites() is called in regular rollbacks as well (single writer) and not in the context of cleaner

* Tests no more than 1 clean is scheduled/executed if HoodieCompactionConfig.allowMultipleCleanSchedule config is disabled.
*/
@Test
public void testMultiClean() throws Exception {
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there any file which has cleaner specific tests? This does not seem metadata table related test.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah. I just followed up from where you left :) will try to move it to TestCleaner.

Copy link
Member Author

@prashantwason prashantwason 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. A few minor comments.

@nsivabalan
Copy link
Contributor

@prashantwason : addressed all feedback.

Copy link
Member Author

@prashantwason prashantwason left a comment

Choose a reason for hiding this comment

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

LGTM

@nsivabalan
Copy link
Contributor

@yihua : do you want to review. Prashant has given a ship it.

Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

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

addressed all comments

}
LOG.info("Cleaner started");
final Timer.Context timerContext = metrics.getCleanCtx();
LOG.info("Cleaned failed attempts if any");
Copy link
Contributor

Choose a reason for hiding this comment

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

I have moved it to CleanerUtils.rollbackFailedWrites().
rollbackFailedwrites() is called in regular rollbacks as well (single writer) and not in the context of cleaner

* Tests no more than 1 clean is scheduled/executed if HoodieCompactionConfig.allowMultipleCleanSchedule config is disabled.
*/
@Test
public void testMultiClean() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah. I just followed up from where you left :) will try to move it to TestCleaner.

@nsivabalan nsivabalan force-pushed the pw_fix_multi_clean_OSS branch from 3ab4015 to 8c8eeed Compare February 15, 2022 23:30
@nsivabalan
Copy link
Contributor

@yihua : if you are good, can I go ahead and merge this in.

@apache apache deleted a comment from hudi-bot Feb 21, 2022
Copy link
Contributor

@yihua yihua left a comment

Choose a reason for hiding this comment

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

LGTM. For the config naming, let's have a consensus.

@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

@nsivabalan nsivabalan merged commit 0dee8ed into apache:master Feb 22, 2022
@nsivabalan nsivabalan added the status:triaged Issue has been reviewed and categorized label Feb 27, 2022
vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
…n operations are present using a config. (apache#4212)


Co-authored-by: sivabalan <n.siva.b@gmail.com>
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 priority:high Significant impact; potential bugs status:triaged Issue has been reviewed and categorized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants