Skip to content

[HUDI-5520] Fail MDT when list of log files grow unboundedly#7638

Closed
jonvex wants to merge 2 commits intoapache:masterfrom
jonvex:fail_if_mdt_logs_get_too_big
Closed

[HUDI-5520] Fail MDT when list of log files grow unboundedly#7638
jonvex wants to merge 2 commits intoapache:masterfrom
jonvex:fail_if_mdt_logs_get_too_big

Conversation

@jonvex
Copy link
Contributor

@jonvex jonvex commented Jan 10, 2023

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

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

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 + ".");
Copy link
Contributor

Choose a reason for hiding this comment

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

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".

@nsivabalan nsivabalan changed the title [HUDI-5520] Fail MDT when list of log files grow > 1000 [HUDI-5520] Fail MDT when list of log files grow unboundedly Jan 10, 2023
@nsivabalan nsivabalan added priority:blocker Production down; release blocker metadata labels Jan 10, 2023
@jonvex jonvex requested a review from nsivabalan January 10, 2023 21:17
@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 added priority:critical Production degraded; pipelines stalled and removed priority:blocker Production down; release blocker labels Jan 24, 2023
initWriteConfigAndMetatableWriter(writeConfig, true);

HoodieException e = assertThrows(HoodieException.class, () -> {
for (int i = 0; i < HoodieBackedTableMetadataWriter.MAX_LOG_FILE_LIST_LENGTH + 100; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

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() {
Copy link
Member

Choose a reason for hiding this comment

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

this should be static and parameterize the max length

@xushiyan
Copy link
Member

re-worked in #8772

@xushiyan xushiyan closed this May 21, 2023
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 release-0.14.0

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants