-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4517] If no marker type file, fallback to timeline based marker #6266
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inspected the code again to see if there will be a chance where marker type will be missing in timeline server based markers. looks like we first create the marker type file before creating any markers. may be just the directory will exists w/o any marker type file and w/o any makers. But there should not be a case where marker type is missing and there are valid markers found incase of TimelineBasedMarkers.
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.
there is one flow where we could end up in this situation, but I could not piece end to end fully together.
Lets say, rollback was triggered using timeline based markers. Towards the end, when everything is complete, we go ahead and delete the marker directory. During this, lets say marker type file was deleted, but before deleting all markers, process crashed. We might end up in this state. But from looking at the code, rollback is actually complete by now (i.e. original commit files would have been deleted, and infact rollback commit would also be completed by now. So, a failure during deletion of marker directory should not have any impact. rollback will never be re-triggered for this case.
Let me know if you guys can think of a scenario where this could happen. would really love to find the root cause.
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.
That's possible. However, it was reported in #5591 that the rollback failed.
The other thing is that the creation of marker type file is contingent on existence of marker dir. What if the first time marker dir got created but marker type file was not created, then on retry
MarkerDirState#writeMarkerTypeToFilesees that the marker dr already exists so it skips marker type file creation and setsisMarkerTypeWrittento true and goes ahead with writing marker files. For such cases, we need to explicitly check whether marker type file exists or not.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.
that makes sense. thanks for finding the potential root cause.