-
Notifications
You must be signed in to change notification settings - Fork 1
Rahil c/upgrade downgrade #2
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
base: master
Are you sure you want to change the base?
Conversation
@@ -130,6 +133,12 @@ public boolean needsUpgrade(HoodieTableVersion toWriteVersion) { | |||
* @param instantTime current instant time that should not be touched. | |||
*/ | |||
public void run(HoodieTableVersion toVersion, String instantTime) { | |||
// Rollback any pending writes and compact before upgrade/downgrade operations | |||
HoodieTable table = upgradeDowngradeHelper.getTable(config, context); | |||
rollbackFailedWritesAndCompact(table, context, config, upgradeDowngradeHelper, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't invoke this for all upgrade/downgrade handlers. it depends on the exact from and to version.
So, we might have to expose two methods like below to the UpgradeHandler.
boolean needsRollbackPendingCommitAndCompact();
once we have this, we might wanna do something like below. bcoz, not all upgrade and downgrade handlers need this to be invoked.
UpgradeDowngrade.run(....) {
loop through from to to version handlers and check if any handler returns true for needsRollbackPendingCommitAndCompact().
if yes, we need to call rollback pending commits and compact.
if not, move on
.
.
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented the feedback based on the notes above, let me know if rough impl looks ok to you or if the understanding was incorrect.
...-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java
Outdated
Show resolved
Hide resolved
c24c756
to
6bd9d9f
Compare
4a62097
to
63159c8
Compare
d707a04
to
1aabd2e
Compare
…o avoid data duplication (apache#13659)
…k multi-format reading to FileGroupReader (apache#13632)
…d nested columns (apache#13663) * fix bug and clean up * refactoring to be more efficient --------- Co-authored-by: Jonathan Vexler <=> Co-authored-by: danny0405 <[email protected]>
…riter (apache#13672) * fix field renaming in spark projection * should not use full path so that we match the output of the merger * update comments that were wrong * avoid string handling when field is not renamed --------- Co-authored-by: Jonathan Vexler <=> Co-authored-by: danny0405 <[email protected]>
…ed is not set in cleaner output (apache#13660)
) * fix restore sequence to be in completion reverse order, still requested time comparison for compaction * add a custom comparator for the restore instant sort --------- Co-authored-by: danny0405 <[email protected]>
…ge handle migration (apache#13670) Co-authored-by: danny0405 <[email protected]>
1aabd2e
to
d571e28
Compare
d571e28
to
cf5d939
Compare
588533d
to
1f39c2d
Compare
Change Logs
Describe context and summary for this change. Highlight if any code was copied.
Impact
Describe any public API or user-facing feature change or any performance impact.
Risk level (write none, low medium or high below)
If medium or high, explain what verification was done to mitigate the risks.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist