-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-3404] Automatically adjust write configs based on metadata table and write concurrency mode #4975
[HUDI-3404] Automatically adjust write configs based on metadata table and write concurrency mode #4975
Conversation
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.
if I am not wrong, we discussed that w/ deltatstreamer, its not easy to distinguish if async table services are enabled since no explicit configs are set. So, don't we need some fix in deltastreamer class towards this ?
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
Show resolved
Hide resolved
based on our discussion, lets add table type check and check for compaction only for MOR. |
I added the logic based on table type. By default COW table should not have any async table service enabled, while MOR table have async compaction enabled. So the auto config adjustment for metadata table is different for different types of tables. |
0c1aad3
to
1bc5f11
Compare
Good job on the patch Ethan! |
…e and write concurrency mode (apache#4975)
…e and write concurrency mode (apache#4975)
What is the purpose of the pull request
This PR adds logic to automatically adjust write configs based on metadata table enablement and write concurrency mode, to prevent possible missing configs that are required for enabling metadata table and multi-writer. Write configs in scope are:
The following scenarios are checked:
hoodie.write.concurrency.mode=optimistic_concurrency_control
,hoodie.write.lock.provider=org.apache.hudi.client.transaction.lock.InProcessLockProvider
andhoodie.cleaner.policy.failed.writes=LAZY
hoodie.cleaner.policy.failed.writes=LAZY
if user has sethoodie.write.concurrency.mode=optimistic_concurrency_control
hoodie.cleaner.policy.failed.writes=LAZY
if user has sethoodie.write.concurrency.mode=optimistic_concurrency_control
hoodie.cleaner.policy.failed.writes=LAZY
if user has sethoodie.write.concurrency.mode=optimistic_concurrency_control
Note that the logic also depends on Hudi table type, since by default, MOR table has async compaction enabled, while COW table has all inline table services.
Brief change log
HoodieWriteConfig
.TestHoodieWriteConfig
to make sure the logic is correct.Verify this pull request
This change adds tests in
TestHoodieWriteConfig
to verify the logic.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.