-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-6196] Keep compatibility for old version archival instants without ACTION_STATE field #8607
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
Conversation
…re ACTION_STATE is not present in instants.
| // Older files don't have action state set. | ||
| Object action = record.get(ACTION_STATE); | ||
| return record.get(ACTION_TYPE_KEY).toString().equals(HoodieTimeline.COMPACTION_ACTION) | ||
| && (action == null || HoodieInstant.State.INFLIGHT.toString().equals(action.toString())); |
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.
When action equals null, the instant state is definite to be INFLIGHT for old version ? Can we write ta test case?
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.
old version is deprecated/fixed so dont know how to write unit tests for them.
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.
Fine, we are good to go, I did see several issues with this in-compatibility, let's merge it first.
| record -> { | ||
| // Very old archived instants don't have action state set. | ||
| Object action = record.get(ACTION_STATE); | ||
| return action == null || HoodieInstant.State.COMPLETED.toString().equals(action.toString()); |
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.
When action equals null, the instant state is definite to be COMPLETE for old version ? Can we write ta test case?
…out ACTION_STATE field (apache#8607)
…out ACTION_STATE field (apache#8607)
…out ACTION_STATE field (apache#8607)
[MINOR] Fixed the reading of instants from very old archive files where ACTION_STATE is not present in instants.
Change Logs
Ensure that ACTION_STATE exists in the record before performing the equals comparison.
Impact
Very old archive files can be read.
Risk level (write none, low medium or high below)
None
Documentation Update
None
Contributor's checklist