Skip to content

[HUDI-2296] pr flink support ConsistencyGuard plugin#3453

Closed
gengxuhan wants to merge 2 commits intoapache:masterfrom
gengxuhan:HUDI-2296
Closed

[HUDI-2296] pr flink support ConsistencyGuard plugin#3453
gengxuhan wants to merge 2 commits intoapache:masterfrom
gengxuhan:HUDI-2296

Conversation

@gengxuhan
Copy link

@gengxuhan gengxuhan commented Aug 11, 2021

Tips

What is the purpose of the pull request

(For example: This pull request adds quick-start document.)

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@gengxuhan
Copy link
Author

flink support ConsistencyGuard plugin,When there is metadata latency in the file system,Submit CKP once, and then start a new instant. Because the commit cannot be seen, the data will be rolled back. @leesf

public static final ConfigOption<Boolean> CONSISTENCY_CHECK_ENABLED_PROP = ConfigOptions
.key("hoodie.consistency.check.enabled")
.booleanType()
.defaultValue(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use shorter name for flink options: consistency.check.enabled


public static final ConfigOption<Integer> INITIAL_CONSISTENCY_CHECK_INTERVAL_MS_PROP = ConfigOptions
.key("hoodie.consistency.check.initial_interval_ms")
.intType()
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

.withDescription("Amount of time (in ms) to wait, before checking for consistency after an operation on storage.");

public static final ConfigOption<Integer> MAX_CONSISTENCY_CHECK_INTERVAL_MS_PROP = ConfigOptions
.key("hoodie.consistency.check.max_interval_ms")
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

.withDescription("Maximum amount of time (in ms), to wait for consistency checking.");

public static final ConfigOption<Integer> MAX_CONSISTENCY_CHECKS_PROP = ConfigOptions
.key("hoodie.consistency.check.max_checks")
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Author

Choose a reason for hiding this comment

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

OK, I'll modify it

Copy link
Author

Choose a reason for hiding this comment

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

Hello, I revised it

@gengxuhan gengxuhan requested review from danny0405 August 11, 2021 08:43
@gengxuhan
Copy link
Author

@hudi-bot run azure

@gengxuhan
Copy link
Author

@danny0405 hi , Can this PR be merged?

private void transitionState(HoodieInstant fromInstant, HoodieInstant toInstant, Option<byte[]> data) {
transitionState(fromInstant, toInstant, data, false);
transitionState(fromInstant, toInstant, data, this.metaClient.getConsistencyGuardConfig().isConsistencyCheckEnabled());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why the consistency check enabled then allows the duplicate files ?

Copy link
Author

Choose a reason for hiding this comment

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

@danny0405 Because in the HoodieWrapperFileSystem file system, only createNewFile uses consistencyguard,
If not called, it will not take effect

@hudi-bot
Copy link
Collaborator

hudi-bot commented Nov 5, 2021

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@yihua yihua added writer-core engine:flink Flink integration priority:high Significant impact; potential bugs labels Sep 13, 2022
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Feb 26, 2024
@yihua
Copy link
Contributor

yihua commented Sep 5, 2024

@danny0405 is this still relevant? If not, could we close the PR?

@danny0405
Copy link
Contributor

Let's close it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine:flink Flink integration priority:high Significant impact; potential bugs size:S PR with lines of changes in (10, 100]

Projects

Status: 🚧 Needs Repro
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants