yihua opened a new pull request #4975:
URL: https://github.com/apache/hudi/pull/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:
   ```
   hoodie.metadata.enable (read-only in the new logic)
   hoodie.write.concurrency.mode (can be auto updated in the new logic)
   hoodie.write.lock.provider (can be auto updated in the new logic)
   hoodie.cleaner.policy.failed.writes (can be auto updated in the new logic)
   ```
   The following scenarios are checked:
   | Metadata Table | Async Table Services | Lock Provider Set by User | Action 
|
   | ----------- | ----------- | ----------- | ----------- |
   | Enabled      | Enabled     |  No | Set 
`hoodie.write.concurrency.mode=optimistic_concurrency_control`, 
`hoodie.write.lock.provider=org.apache.hudi.client.transaction.lock.InProcessLockProvider`
 and `hoodie.cleaner.policy.failed.writes=LAZY`  |
   | Enabled   | Enabled        | Yes | Set 
`hoodie.cleaner.policy.failed.writes=LAZY` if user has set 
`hoodie.write.concurrency.mode=optimistic_concurrency_control` |
   | Enabled   | Disabled        | Yes/No | Set 
`hoodie.cleaner.policy.failed.writes=LAZY` if user has set 
`hoodie.write.concurrency.mode=optimistic_concurrency_control` |
   | Disabled   | Enabled/Disabled        | Yes/No | Set 
`hoodie.cleaner.policy.failed.writes=LAZY` if user has set 
`hoodie.write.concurrency.mode=optimistic_concurrency_control` |
   
   ## Brief change log
   
   - Adds auto config adjustment to in `HoodieWriteConfig`.
   - Adds unit tests for different user-defined config scenarios in 
`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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to