[HUDI-5520] Fail MDT when list of log files grow unboundedly#7638
Closed
jonvex wants to merge 2 commits intoapache:masterfrom
Closed
[HUDI-5520] Fail MDT when list of log files grow unboundedly#7638jonvex wants to merge 2 commits intoapache:masterfrom
jonvex wants to merge 2 commits intoapache:masterfrom
Conversation
nsivabalan
reviewed
Jan 10, 2023
| logSize = metadataMetaClient.getActiveTimeline().getDeltaCommitTimeline().countInstants(); | ||
| } | ||
| if (logSize > MAX_LOG_FILE_LIST_LENGTH) { | ||
| throw new HoodieException("List of log files has grown beyond " + MAX_LOG_FILE_LIST_LENGTH + "."); |
Contributor
There was a problem hiding this comment.
lets fix the log msg.
"Looks like metadata table log files are growing unbounded due to a pending instant in data table timeline. Please fix that and restart the pipeline".
Collaborator
xushiyan
requested changes
May 21, 2023
| initWriteConfigAndMetatableWriter(writeConfig, true); | ||
|
|
||
| HoodieException e = assertThrows(HoodieException.class, () -> { | ||
| for (int i = 0; i < HoodieBackedTableMetadataWriter.MAX_LOG_FILE_LIST_LENGTH + 100; i++) { |
Member
There was a problem hiding this comment.
this test actually does 1100 commits to finish.
| * If there is an instant that is stuck pending, compaction will never occur and the log length will grow unbounded. | ||
| * Throw an exception if MAX_LOG_FILE_LIST_LENGTH is exceeded. | ||
| */ | ||
| private void checkLogFileListLength() { |
Member
There was a problem hiding this comment.
this should be static and parameterize the max length
Member
|
re-worked in #8772 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change Logs
If there is an instance stuck pending then compaction will never occur. This change throws an exception if 1000 log files are created without a compaction occurring.
Impact
Logfiles will no longer grow unbounded.
Risk level (write none, low medium or high below)
low
Documentation Update
N/A
Contributor's checklist